Skip to content

Instantly share code, notes, and snippets.

@intjonathan
Created February 28, 2014 22:46
Show Gist options
  • Save intjonathan/9281646 to your computer and use it in GitHub Desktop.
Save intjonathan/9281646 to your computer and use it in GitHub Desktop.
Expect script for sending passwords when upgrading puppet agent
set timeout 60
spawn ./upgrade_nodes_pe3.sh <fqdn> <fqdn> <fqdn>
while {1} {
expect {
eof {break}
"The authenticity of host" {send "yes\r"}
"password for YOURUSER:" {send "PASSWORD\r"}
#"*\]" {send "exit\r"}
}
}
wait
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment