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

Add feature to get Windows password generated by AWS #133

Closed
wants to merge 3 commits into from

Conversation

zl4bv
Copy link
Contributor

@zl4bv zl4bv commented May 28, 2015

Rather than pre-determining the password for a Windows instance (baked AMI, set password in user-data, etc) it would be nice to be able to use the password generated automatically by AWS.

Example config:

---
driver:
  name: ec2
  aws_ssh_key_id: key_pair_name
  get_windows_password: true

transport:
  name: winrm
  username: Administrator
  ssh_key: /path/to/key_pair_name.pem

@tyler-ball
Copy link
Contributor

Rather than adding a new config key, shouldn't we just fetch the password if they have supplied config[:username] =~ /[Aa]dministrator/ and haven't supplied config[:password]?

@zl4bv
Copy link
Contributor Author

zl4bv commented Jun 3, 2015

Yeah that makes more sense.

My concern is when this is used with a Linux instance with an SSH key (therefore not specifying a password). If we're happy to assume that someone running kitchen-ec2 with a Linux instance won't use a username matching /[Aa]dministrator/ then it should be fine.

@tyler-ball
Copy link
Contributor

The driver has a windows_os? method that can tell if the instance its spinning up is a Windows instance

@tyler-ball
Copy link
Contributor

Closing this as it was merged as part of #150

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants