Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow a proc/lambda for knife[:winrm_password] #169

Open
docwhat opened this issue Feb 4, 2015 · 1 comment
Open

Allow a proc/lambda for knife[:winrm_password] #169

docwhat opened this issue Feb 4, 2015 · 1 comment
Labels
Type: Enhancement Adds new functionality.

Comments

@docwhat
Copy link

docwhat commented Feb 4, 2015

Our Administrator passwords vary per machine (for best security). It would be nice if we could use a callback for knife[:winrm_password] so that we could look up the password (it's in a yaml file that becomes a databag, but other users might want to look it up some other way) on a per machine basis.

I'm imagining something like:

def lookup_admin_password(node_name):
  YAML.load('my_passwords.yml')[node_name]
end

knife[:winrm_user] = 'Administrator'
knife[:winrm_password] = method(:lookup_admin_password)
@docwhat
Copy link
Author

docwhat commented Feb 9, 2015

I also ran across another use case: changing the winrm_port and winrm_transport based on node attributes, since not all nodes use HTTPS at the moment.

@tas50 tas50 added Type: Enhancement Adds new functionality. and removed New Feature labels Jul 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Adds new functionality.
Projects
None yet
Development

No branches or pull requests

3 participants