Closed hh closed 8 years ago
Any reason why you filed this here in knife-windows? This does not strike me as a bug of knife-windows or maybe even a bug at all. I do see how it could be annoying but its a byproduct of how knife deals with config settings.
see https://github.com/chef/chef/blob/master/lib/chef/knife.rb#L310
One way to address that here would be to introduce a different argument name altogether for knife winrm but that would need to be mirrored in knife ssh.
I'm going to close for now but please feel free to reopen if you feel this needs further discussion in knife-windows.
As a knife winrm/ssh user
When I put "knife[:{ssh,winrm}-attribute] = X" in knife.rb
Then the default connection host should come from attribute X
And it should have no affect on the output "knife node show" command
I think we should use a different attribute for knife winrm around https://github.com/chef/knife-windows/blob/master/lib/chef/knife/winrm_shared_options.rb#L37
Maybe we should open a similar bug against https://github.com/chef/chef/blob/master/lib/chef/knife/ssh.rb#L51
Another approach would be to rename the default knife.rb attribute for knife node show
.
I don't think I can reopen, can someone with authorization to do so do so? :)
closing and tracking in #371
Given a knife.rb with:
I can run
knife winrm name:foo
without specifying-a
or--attribute
to set the hostname/ip.However using that same knife.rb if I run
knife node show foo
it defaults to showing only that attribute.