Skip to content

Instantly share code, notes, and snippets.

@poppen
Created May 1, 2013 08:40
Show Gist options
  • Select an option

  • Save poppen/5494347 to your computer and use it in GitHub Desktop.

Select an option

Save poppen/5494347 to your computer and use it in GitHub Desktop.
Expect script for running knife solo
#!/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