3 # each component defines exactly one static master. Content is copied from the source host
4 # to the master, and from there to all the mirrors.
6 class roles::static_master {
7 include roles::static::base
8 include roles::static::srvdir
10 # masters need to talk to mirrors and sources and themselves
11 class { 'roles::static::ssh':
12 add_tag => [ 'staticsync-mirror', 'staticsync-source', 'staticsync-master' ],
13 collect_tag => 'staticsync-master',
16 file { '/usr/local/bin/static-master-run':
17 source => 'puppet:///modules/roles/static-mirroring/static-master-run',
20 file { '/usr/local/bin/static-master-update-component':
21 source => 'puppet:///modules/roles/static-mirroring/static-master-update-component',
24 file { '/etc/static-clients.conf':
25 content => template('roles/static-mirroring/static-clients.conf.erb'),
28 file { '/home/staticsync/static-master':
30 target => '/srv/static.debian.org',
32 file { '/srv/static.debian.org/master':
35 owner => 'staticsync',
36 group => 'staticsync',
39 # export some information for the onion.debian.org build
40 if $::hostname in [dillon] {
41 file { '/srv/puppet.debian.org':
44 file { '/srv/puppet.debian.org/puppet-facts':
47 concat { '/srv/puppet.debian.org/puppet-facts/onionbalance-services.yaml':
48 notify => Exec['rebuild-onion-website'],
50 Concat::Fragment <<| tag == 'onionbalance-services.yaml' |>>
52 exec { 'rebuild-onion-website':
53 command => '/bin/su - staticsync -c \'make -C /srv/onion-master.debian.org\'',