Created
May 1, 2013 08:40
-
-
Save poppen/5494347 to your computer and use it in GitHub Desktop.
Expect script for running knife solo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| host="" | |
| password="" | |
| expect -c " | |
| spawn ./bin/knife solo cook -V root@${host} | |
| expect Enter; send $password; send \r | |
| set done 0 | |
| while {\$done == 0} { | |
| expect { | |
| root { send $password; send \r } | |
| eof { set done 1 } | |
| } | |
| } | |
| " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment