Restart apache2, ssh, and nginx after running puppet.

(imported from commit 0e0b7fd10d1742efe86ff6bdab8d3ac4e4d291a9)
This commit is contained in:
Tim Abbott
2012-10-30 14:20:12 -04:00
parent 1d6a5741e0
commit 2c577d70b3

View File

@@ -58,13 +58,20 @@ scp -i ~/humbug/humbug.pem ~/humbug/certs/humbug-self-signed.key root@"$server":
ssh "$server" -t -i ~/humbug/humbug.pem -lroot <<EOF
cp -a /root/humbug/servers/puppet/puppet.conf /etc/puppet/
# HACK: run puppet twice to workaround bug in apache module handling
# HACK: run puppet twice to workaround bug in puppet's dependency
# resolution (namely apache module 'ssl' being enabled _after_ the
# sites that use it )
puppet apply /root/humbug/servers/puppet/manifests/site.pp || true
puppet apply /root/humbug/servers/puppet/manifests/site.pp
# The last bit should be moveable into puppet-land, ideally
service apache2 restart
service ssh restart
# These server restarting bits should be moveable into puppet-land, ideally
apt-get upgrade
service ssh restart
if [ -e "/etc/init.d/nginx" ]; then
service nginx restart
fi
if [ -e "/etc/init.d/apache2" ]; then
service apache2 restart
fi
EOF
set +x