-
-
Save anonymous/eb2f12ece621cbf061405b8cd9cc3334 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
# Pastebin 0LeCnbob | |
$setupscript = <<END | |
# Hardlock domain name | |
echo 'supercede domain-name "example.com";' > /etc/dhcp/dhclient.conf | |
# Install etc/hosts for convenience | |
cp /vagrant/etc-puppet/hosts /etc/hosts | |
# Add /opt/puppetlabs to the sudo secure_path | |
echo "Before sed line" | |
grep secure /etc/sudoers | |
sed -i -e 's#\(secure_path = .*\)$#\1:/opt/puppetlabs/bin#' /etc/sudoers | |
#sed -i -e 's/\(secure_path = .*\)$/\1:\/opt\/puppetlabs\/bin/' /etc/sudoers | |
grep secure /etc/sudoers | |
# Install puppet.conf in user directory to share code directory | |
mkdir -p /home/vagrant/.puppetlabs/etc/puppet | |
cp /vagrant/etc-puppet/personal-puppet.conf /home/vagrant/.puppetlabs/etc/puppet/puppet.conf | |
chown -R vagrant:vagrant /home/vagrant/.puppetlabs | |
# Install example hiera settings in global directory | |
mkdir -p /etc/puppetlabs/puppet | |
cp /vagrant/etc-puppet/puppet.conf /etc/puppetlabs/puppet/ | |
mkdir -p /etc/puppetlabs/code | |
chown -R vagrant:vagrant /etc/puppetlabs | |
# Provide the URL to the Puppet Labs yum repo on login | |
echo " | |
You should start by enabling the Puppet Labs Puppet Collection 1 release repo | |
sudo yum install http://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm | |
Then install Puppet 4 and its companion packages | |
sudo yum install -y puppet-agent | |
" > /etc/motd | |
# Enable MotD | |
sed -i -e 's/^PrintMotd no/PrintMotd yes/' /etc/ssh/sshd_config | |
systemctl reload sshd | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment