Last active
April 14, 2017 20:35
-
-
Save awaxa/c821e0b3c0e0ece9d5a767c3b85765df 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
#!/usr/bin/env bash | |
# before running this script: | |
# manually assign a hostname in System Preferences/Sharing | |
# optionally, set external facts github_token_ro and github_token_rw | |
set -evx | |
sudo mkdir -p /etc/puppetlabs/{puppet,facter/facts.d} | |
export PATH=$PATH:$HOME/.gem/ruby/2.0.0/bin | |
gem install puppet --user-install --no-rdoc --no-ri | |
sudo puppet config set --section main certname "$(facter hostname).local" | |
sudo puppet config set --section agent server puppet.awaxa.com | |
echo -e '---\nextension_requests:\n pp_role: workstation' | sudo tee /etc/puppetlabs/puppet/csr_attributes.yaml | |
caffeinate -d sudo puppet agent -t --waitforcert 5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment