Revision history [back]

click to hide/show revision 1
initial version

One option is to use an expect script though this is a bit fragile, it will break if the expected string ever changes:

$script = <<SCRIPT
set -e
set -x

sudo yum install -y http://rdo.fedorapeople.org/rdo-release.rpm
sudo yum install -y openstack-packstack expect

expect << EOF
spawn "/usr/bin/packstack" "--allinone"
expect "Setting up ssh keys...root@10.0.2.15's password:"
send "vagrant\n"
EOF

SCRIPT

One option is to use an expect script though this is a bit fragile, it will break if the expected string ever changes:

$script = <<SCRIPT
set -e
set -x

sudo yum install -y http://rdo.fedorapeople.org/rdo-release.rpm
sudo yum install -y openstack-packstack expect

expect << EOF
set timeout -1
spawn "/usr/bin/packstack" "--allinone"
expect "Setting up ssh keys...root@10.0.2.15's password:"
send "vagrant\n"
expect eof
EOF

SCRIPT