380ad3dac8e68d9261b763ecf36ae281d6c981fd
[mirror/dsa-puppet.git] / modules / roles / manifests / static_mirror.pp
1 # a static mirror
2 #
3 # this receives pushes from the master and then usually serves the content to the public
4 class roles::static_mirror {
5   include roles::static::base
6   include roles::static::srvdir
7
8   # mirrors talk only to masters
9   class { 'roles::static::ssh':
10     add_tag     => 'staticsync-master',
11     collect_tag => 'staticsync-mirror',
12   }
13
14   file { '/usr/local/bin/static-mirror-run':
15     source => 'puppet:///modules/roles/static-mirroring/static-mirror-run',
16     mode   => '0555',
17   }
18
19   file { '/usr/local/bin/static-mirror-run-all':
20     source => 'puppet:///modules/roles/static-mirroring/static-mirror-run-all',
21     mode   => '0555',
22   }
23
24   file { '/etc/cron.d/puppet-static-mirror': ensure => absent, }
25   concat::fragment { 'puppet-crontab--static-mirror':
26     target => '/etc/cron.d/puppet-crontab',
27     content  => @(EOF)
28       @reboot staticsync sleep 60; chronic static-mirror-run-all
29       | EOF
30   }
31 }