X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Froles%2Fmanifests%2Fstatic_master.pp;h=c16870a1f1ce97afc24e32d24d86423aea69b3be;hb=2f488926a0357a55878fd6f6c18727617a10f2be;hp=bb722be7d1602bca9224879a70f38d08b1f0b9bb;hpb=d0023f476fba2facd946b996719ce3e97e03ba79;p=mirror%2Fdsa-puppet.git diff --git a/modules/roles/manifests/static_master.pp b/modules/roles/manifests/static_master.pp index bb722be7d..c16870a1f 100644 --- a/modules/roles/manifests/static_master.pp +++ b/modules/roles/manifests/static_master.pp @@ -1,26 +1,46 @@ -class roles::static_master inherits roles::static_base { - file { - '/etc/ssh/userkeys/staticsync': - content => template('roles/static-master-authorized_keys.erb'), - ; - '/usr/local/bin/static-master-run': - source => "puppet:///modules/roles/static-mirroring/static-master-run", - mode => 555, - ; - '/usr/local/bin/static-master-ssh-wrap': - source => "puppet:///modules/roles/static-mirroring/static-master-ssh-wrap", - mode => 555, - ; - '/usr/local/bin/static-master-update-component': - source => "puppet:///modules/roles/static-mirroring/static-master-update-component", - mode => 555, - ; +class roles::static_master { + include roles::static_base + include roles::static_srvdir - '/etc/static-components.conf': - source => "puppet:///modules/roles/static-mirroring/static-components.conf", - ; - } + 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, + } + } } -# vim:set et: -# vim:set sts=4 ts=4: -# vim:set shiftwidth=4: