X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Froles%2Fmanifests%2Fstatic_master.pp;h=36de4b944fd2386384d9afb8976380ee82cc8c72;hb=a98cc6b0cd0670870d40aac192a14054db973296;hp=73f74c834410cd51eaf9a1bd589a31ea28014f94;hpb=bf3691ae1a76a07158faf2acc34f68a59874ff9c;p=mirror%2Fdsa-puppet.git diff --git a/modules/roles/manifests/static_master.pp b/modules/roles/manifests/static_master.pp index 73f74c834..36de4b944 100644 --- a/modules/roles/manifests/static_master.pp +++ b/modules/roles/manifests/static_master.pp @@ -1,16 +1,57 @@ +# static master +# +# each component defines exactly one static master. Content is copied from the source host +# to the master, and from there to all the mirrors. +# class roles::static_master { + include roles::static::base + include roles::static::srvdir - include roles::static_base + # masters need to talk to mirrors and sources and themselves + class { 'roles::static::ssh': + add_tag => [ 'staticsync-mirror', 'staticsync-source', 'staticsync-master' ], + collect_tag => 'staticsync-master', + } - file { '/usr/local/bin/static-master-run': - source => 'puppet:///modules/roles/static-mirroring/static-master-run', - mode => '0555', - } - file { '/usr/local/bin/static-master-update-component': - source => 'puppet:///modules/roles/static-mirroring/static-master-update-component', - mode => '0555', - } - file { '/etc/static-clients.conf': - content => template('roles/static-mirroring/static-clients.conf.erb'), - } + file { '/usr/local/bin/static-master-run': + source => 'puppet:///modules/roles/static-mirroring/static-master-run', + mode => '0555', + } + file { '/usr/local/bin/static-master-update-component': + source => 'puppet:///modules/roles/static-mirroring/static-master-update-component', + mode => '0555', + } + file { '/etc/static-clients.conf': + content => template('roles/static-mirroring/static-clients.conf.erb'), + } + + file { '/home/staticsync/static-master': + ensure => link, + target => '/srv/static.debian.org', + } + file { '/srv/static.debian.org/master': + ensure => directory, + mode => '0755', + owner => 'staticsync', + group => 'staticsync', + } + + # export some information for the onion.debian.org build + if $::hostname in [dillon] { + file { '/srv/puppet.debian.org': + ensure => directory + } + file { '/srv/puppet.debian.org/puppet-facts': + ensure => directory + } + concat { '/srv/puppet.debian.org/puppet-facts/onionbalance-services.yaml': + notify => Exec['rebuild-onion-website'], + } + Concat::Fragment <<| tag == 'onionbalance-services.yaml' |>> + + exec { 'rebuild-onion-website': + command => '/bin/su - staticsync -c \'make -C /srv/onion-master.debian.org\'', + refreshonly => true, + } + } }