1 # a static mirror. It will get content for all components that it servers
2 # from each component's master.
4 # Static mirrors register themselves via a stored-conf /etc/static-clients.conf
5 # that the masters collect. Mirrors can always pull, but they only get
6 # triggered if they are in /etc/static-clients.conf. So during initial
7 # setup it might make sense to not get triggered and thus block updates of
8 # components until all mirrors are in sync; set $get_triggered = false for that.
10 class staticsync::static_mirror (
11 Boolean $get_triggered = true,
13 include staticsync::base
14 include staticsync::srvdir
16 # mirrors talk only to masters
17 class { 'staticsync::ssh':
18 add_tag => 'staticsync-master',
19 collect_tag => 'staticsync-mirror',
22 file { '/usr/local/bin/static-mirror-run':
23 source => 'puppet:///modules/staticsync/static-mirror-run',
26 file { '/usr/local/bin/static-mirror-run-all':
27 source => 'puppet:///modules/staticsync/static-mirror-run-all',
30 file { '/etc/cron.d/puppet-static-mirror': ensure => absent, }
31 concat::fragment { 'puppet-crontab--static-mirror':
32 target => '/etc/cron.d/puppet-crontab',
34 @reboot ${staticsync::user} sleep 60; chronic static-mirror-run-all
39 @@concat::fragment { "static-client-${::fqdn}":
40 tag => 'staticsync::static-mirrors-to-trigger',
42 target => '/etc/static-clients.conf',