X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fpuppetmaster%2Fmanifests%2Finit.pp;h=72eae64e4bc27db2b9352f0ad828608af6dd0110;hb=f7adabc11f4b86313d541b2007570cf3e475320b;hp=ca91a0bb2ee995ec680096314ee1e77c7d0754ea;hpb=1317bdace90075351f45cfff10a76af03fe2198a;p=mirror%2Fdsa-puppet.git diff --git a/modules/puppetmaster/manifests/init.pp b/modules/puppetmaster/manifests/init.pp index ca91a0bb2..72eae64e4 100644 --- a/modules/puppetmaster/manifests/init.pp +++ b/modules/puppetmaster/manifests/init.pp @@ -1,5 +1,38 @@ 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', + domain => '(ip ip6)', + rule => '&SERVICE_RANGE(tcp, 8140, $HOST_DEBIAN)', + } + + 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', + } }