Switch db.d.o to letsencrypt
[mirror/dsa-puppet.git] / modules / roles / manifests / static_master.pp
1 class roles::static_master {
2
3         include roles::static_base
4
5         file { '/usr/local/bin/static-master-run':
6                 source => 'puppet:///modules/roles/static-mirroring/static-master-run',
7                 mode   => '0555',
8         }
9         file { '/usr/local/bin/static-master-update-component':
10                 source => 'puppet:///modules/roles/static-mirroring/static-master-update-component',
11                 mode   => '0555',
12         }
13         file { '/etc/static-clients.conf':
14                 content => template('roles/static-mirroring/static-clients.conf.erb'),
15         }
16
17         # export some information for the onion.debian.org build
18         if $::hostname in [dillon] {
19                 file { '/srv/puppet.debian.org':
20                         ensure => directory
21                 }
22                 file { '/srv/puppet.debian.org/puppet-facts':
23                         ensure => directory
24                 }
25                 concat { '/srv/puppet.debian.org/puppet-facts/onionbalance-services.yaml':
26                         notify  => Exec["rebuild-onion-website"],
27                 }
28                 Concat::Fragment <<| tag == "onionbalance-services.yaml" |>>
29
30                 exec { 'rebuild-onion-website':
31                         command => '/bin/su - staticsync -c \'make -C /srv/onion-master.debian.org\'',
32                         refreshonly => true,
33                 }
34         }
35 }