-
-
Save rcorreia/4727514 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
* * * * * ec2-describe-instances | grep ^INSTANCE | awk '{print $4}' > /etc/puppet/autosign.conf |
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
class default_node { | |
package { 'apache2': | |
ensure => installed | |
} | |
service { 'apache2': | |
ensure => true, | |
enable => true, | |
require => Package['apache2'], | |
} | |
} |
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
aptitude install puppetmaster | |
echo "127.0.0.1 puppet" >> /etc/hosts |
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
import "classes/*" | |
node default { | |
include default_node | |
} |
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 | |
set -e -x | |
# Needed so that the aptitude/apt-get operations will not be interactive | |
export DEBIAN_FRONTEND=noninteractive | |
apt-get update && apt-get -y upgrade | |
# Find the current IP of the puppet master and make "puppet" point to it | |
puppet_master_ip=$(host my_puppet_master.company.com | grep "has address" | head -1 | awk '{print $NF}') | |
echo $puppet_master_ip puppet >> /etc/hosts | |
aptitude -y install puppet | |
# Enable the puppet client | |
sed -i /etc/default/puppet -e 's/START=no/START=yes/' | |
service puppet restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment