summaryrefslogtreecommitdiffstats
path: root/utils/infra_setup/user_data/p-agent-user-data
blob: 6ec191b837bf55feb612f98d6da1cfb484891636 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#cloud-config

runcmd:
  - wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb
  - sudo dpkg -i puppetlabs-release-trusty.deb
  - sudo apt-get update
  - sudo apt-get -y install puppet
  - sed -i '/^factpath/a basemodulepath=\/etc\/puppet\/modules' /etc/puppet/puppet.conf
  - sed -i '/^factpath/a server=REPLACED_PUPPET_MASTER_SERVER' /etc/puppet/puppet.conf
  - sed -i '/^factpath/a runinterval=1d' /etc/puppet/puppet.conf
  - sed -i '/^templatedir/d' /etc/puppet/puppet.conf
  - sed -i 's/START=no/START=yes/g' /etc/default/puppet
  - sed -i '/^\[master\]/a dns_alt_names=REPLACED_PUPPET_MASTER_SERVER' /etc/puppet/puppet.conf

final_message: "The system with puppet is finally up, after $UPTIME seconds."