move hiera.yaml into repo root
[mirror/dsa-puppet.git] / modules / puppetmaster / manifests / init.pp
1 class puppetmaster {
2
3         package { 'puppetmaster':
4                 ensure => installed,
5         }
6         file { '/etc/puppet/puppetdb.conf':
7                 source => 'puppet:///modules/puppetmaster/puppetdb.conf'
8         }
9
10         ferm::rule { 'dsa-puppet':
11                 description     => 'Allow puppet access',
12                 domain          => '(ip ip6)',
13                 rule            => '&SERVICE_RANGE(tcp, 8140, $HOST_DEBIAN)',
14         }
15
16         file { '/srv/puppet.debian.org/puppet-facts':
17                 ensure => directory
18         }
19         concat { '/srv/puppet.debian.org/puppet-facts/onionbalance-services.yaml':
20         }
21         Concat::Fragment <<| tag == "onionbalance-services.yaml" |>>
22
23         file { '/etc/cron.d/puppet-update-fastly-ips': ensure => absent, }
24         file { '/etc/cron.d/update-fastly-ips': ensure => absent, }
25         concat::fragment { 'puppet-crontab---fastly-ips':
26                 target => '/etc/cron.d/puppet-crontab',
27                 content  => @(EOF)
28                         @daily  root    /usr/local/bin/update-fastly-ips /srv/puppet.debian.org/puppet-facts/fastly_ranges.yaml
29                         | EOF
30         }
31         file { '/usr/local/bin/update-fastly-ips':
32                 source => 'puppet:///modules/puppetmaster/update-fastly-ips.sh',
33                 mode   => '0555',
34         }
35 }