X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fpuppetmaster%2Fmanifests%2Finit.pp;h=7cb923c2836f5b7632c3305f85b4ad72c0e2cc91;hb=29cbe59430d1e7d7d5575579b48513c56227e2f7;hp=c48ef59914018907f11ba54c0f052490a63fe27c;hpb=3eb533e5499e66423bafdedaf6c7d08ead1772de;p=mirror%2Fdsa-puppet.git diff --git a/modules/puppetmaster/manifests/init.pp b/modules/puppetmaster/manifests/init.pp index c48ef5991..7cb923c28 100644 --- a/modules/puppetmaster/manifests/init.pp +++ b/modules/puppetmaster/manifests/init.pp @@ -1,2 +1,42 @@ class puppetmaster { + + package { 'puppetmaster': + ensure => installed, + } + file { '/etc/puppet/hiera.yaml': + source => 'puppet:///modules/puppetmaster/hiera.yaml' + } + file { '/etc/puppet/puppetdb.conf': + source => 'puppet:///modules/puppetmaster/puppetdb.conf' + } + + ferm::rule { 'dsa-puppet': + description => 'Allow puppet access', + rule => '&SERVICE_RANGE(tcp, 8140, $HOST_DEBIAN_V4)' + } + ferm::rule { 'dsa-puppet-v6': + domain => 'ip6', + description => 'Allow puppet access', + rule => '&SERVICE_RANGE(tcp, 8140, $HOST_DEBIAN_V6)' + } + + file { '/srv/puppet.debian.org/puppet-facts': + ensure => directory + } + concat { '/srv/puppet.debian.org/puppet-facts/onionbalance-services.yaml': + } + Concat::Fragment <<| tag == "onionbalance-services.yaml" |>> + + file { '/etc/cron.d/puppet-update-fastly-ips': ensure => absent, } + file { '/etc/cron.d/update-fastly-ips': ensure => absent, } + concat::fragment { 'dsa-puppet-stuff---fastly-ips': + target => '/etc/cron.d/dsa-puppet-stuff', + content => @(EOF) + @daily root /usr/local/bin/update-fastly-ips /srv/puppet.debian.org/puppet-facts/fastly_ranges.yaml + | EOF + } + file { '/usr/local/bin/update-fastly-ips': + source => 'puppet:///modules/puppetmaster/update-fastly-ips.sh', + mode => '0555', + } }