Use a tmp file instead of pipe to avoid human intervention

This commit is contained in:
Yun Mao 2013-05-07 21:38:36 -04:00
parent 9162048e80
commit 9dbf777413
1 changed files with 4 additions and 1 deletions

View File

@ -16,7 +16,7 @@ sudo apt-get install -y opscode-keyring # permanent upgradeable keyring
sudo apt-get install -y debconf-utils
sudo apt-get -y upgrade
cat | sudo debconf-set-selections << EOF
cat > /tmp/chef_seed << EOF
# New password for the 'admin' user in the Chef Server WebUI:
chef-server-webui chef-server-webui/admin_password password ${CHEF_PASSWORD}
# New password for the 'chef' AMQP user in the RabbitMQ vhost "/chef":
@ -25,5 +25,8 @@ chef-solr chef-solr/amqp_password password ${CHEF_PASSWORD}
chef chef/chef_server_url string http://${CHEF_SERVER}:4000
EOF
sudo debconf-set-selections < /tmp/chef_seed
rm -rf /tmp/chef_seed
sudo apt-get -y install chef chef-server chef-server-api chef-expander