Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.