Last active
February 5, 2016 18:03
-
-
Save n3r0-ch/61aae3cba466b77b4e2b to your computer and use it in GitHub Desktop.
Masterless Puppet Installation
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
#!/bin/bash | |
export DEBIAN_FRONTEND=noninteractive | |
export LC_ALL="en_US.UTF-8" | |
#Backup old puppet directory | |
if [ -d "/etc/puppet" ] | |
then | |
mv /etc/puppet /etc/puppet-bak | |
fi | |
#Set SSH Key Permission | |
chmod 600 /root/.ssh/puppet | |
#Add puppetlabs sources | |
cd ~; wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb | |
dpkg -i puppetlabs-release-trusty.deb | |
apt-get update | |
rm puppetlabs-release-trusty.deb | |
#Install git | |
apt-get -y install git-core | |
#Clone puppet repo | |
git clone git@puppet:wwd-internal/puppet.git /etc/puppet | |
#Set permissions | |
chmod 755 /etc/puppet/apply.sh | |
#Install git and puppet | |
#Puppet installation returns wrong error code | |
apt-get -y install puppet || true | |
#Apply puppet config | |
bash /etc/puppet/apply.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment