X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Froles%2Fmanifests%2Fstatic_master.pp;h=6a36ed3fc5e13b62a4514bbd56ed72228ef09b34;hb=168aa3f05f914802698b8db5fdde823c4e992913;hp=6750aa6a931086b6a03eca1907126623789dd10c;hpb=d6e20ea4c083d9978ad4c3e5eccaffa2e887698a;p=mirror%2Fdsa-puppet.git diff --git a/modules/roles/manifests/static_master.pp b/modules/roles/manifests/static_master.pp index 6750aa6a9..6a36ed3fc 100644 --- a/modules/roles/manifests/static_master.pp +++ b/modules/roles/manifests/static_master.pp @@ -1,22 +1,38 @@ -class roles::static_master inherits roles::mirror_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, - ; - } +# 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 + + # 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 { '/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', + } } -# vim:set et: -# vim:set sts=4 ts=4: -# vim:set shiftwidth=4: