Created
November 14, 2013 13:44
-
-
Save grahamgilbert/7466978 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# This bootstraps an OS X Puppet Client | |
# | |
# Your Puppet server here | |
PUPPETSERVER='puppet.grahamgilbert.dev' | |
TESTURL='https://raw.github.com' | |
PUPPET_VER=`puppet --version` | |
# If Puppet 3.3.1 isn't installed, it needs to be there... | |
if [ $PUPPET_VER != "3.3.1" ]; then | |
# Test for network conection. Github needs to be up for this to work, so it might as well be that | |
if curl --output /dev/null --silent --head --fail "$TESTURL"; then | |
echo "URL exists: $TESTURL" | |
else | |
exit 1 | |
fi | |
# Download, install and configure Puppet and Facter | |
curl -o /tmp/install_puppet.py https://raw.github.com/grahamgilbert/macscripts/master/Puppet-Install/install_puppet.py; python /tmp/install_puppet.py --appendhosts --server $PUPPETSERVER --serial | |
fi | |
# Run Puppet | |
puppet agent -t |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment