static: whitespace changes and turn double quotes into single quotes if they have...
[mirror/dsa-puppet.git] / modules / roles / manifests / static_master.pp
1 class roles::static_master {
2   include roles::static_base
3   include roles::static_srvdir
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   file { '/home/staticsync/static-master':
18     ensure => link,
19     target => '/srv/static.debian.org',
20   }
21   file { '/srv/static.debian.org/master':
22     ensure => directory,
23     mode   => '0755',
24     owner  => 'staticsync',
25     group  => 'staticsync',
26   }
27
28   # export some information for the onion.debian.org build
29   if $::hostname in [dillon] {
30     file { '/srv/puppet.debian.org':
31       ensure => directory
32     }
33     file { '/srv/puppet.debian.org/puppet-facts':
34       ensure => directory
35     }
36     concat { '/srv/puppet.debian.org/puppet-facts/onionbalance-services.yaml':
37       notify  => Exec['rebuild-onion-website'],
38     }
39     Concat::Fragment <<| tag == 'onionbalance-services.yaml' |>>
40
41     exec { 'rebuild-onion-website':
42       command => '/bin/su - staticsync -c \'make -C /srv/onion-master.debian.org\'',
43       refreshonly => true,
44     }
45   }
46 }