Created
October 18, 2015 16:06
-
-
Save chadh/b1003452652fb6dbb262 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 PATH="/sbin:/bin:/usr/sbin:/usr/bin" | |
| readonly APTOPTS='-o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"' | |
| function install_puppet() { | |
| pushd /root > /dev/null | |
| wget http://apt.puppetlabs.com/puppetlabs-release-wheezy.deb | |
| dpkg -i puppetlabs-release-wheezy.deb | |
| apt-get update | |
| apt-get -y ${APTOPTS} install puppet | |
| popd > /dev/null | |
| } | |
| function install_firstboot() { | |
| cat <<EOF > /etc/init.d/localfirstboot | |
| ### BEGIN INIT INFO | |
| # Provides localfirstboot | |
| # Required-Start: networking | |
| # Default-Start: 3 | |
| # Short-Description: Script run after very first boot | |
| # Description: Script to configure system after initial boot | |
| ### END INIT INFO | |
| puppet agent --test --debug --pluginsync --server parmigiano.cc.gatech.edu --environment infrastructure | |
| update-rc.d localfirst boot disable | |
| EOF | |
| update-rc.d localfirstboot enable | |
| } | |
| install_puppet | |
| install_firstboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment