X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fstaticsync%2Fmanifests%2Fstatic_master.pp;h=716b12c5110f9e306e340c956f03bf382bd15f96;hb=cf760168ec022b1fc8edb9c46d85b29a98af8ca6;hp=6a36ed3fc5e13b62a4514bbd56ed72228ef09b34;hpb=0c067639ec7d7050b69249b85e6aa83ab91820b5;p=mirror%2Fdsa-puppet.git diff --git a/modules/staticsync/manifests/static_master.pp b/modules/staticsync/manifests/static_master.pp index 6a36ed3fc..716b12c51 100644 --- a/modules/staticsync/manifests/static_master.pp +++ b/modules/staticsync/manifests/static_master.pp @@ -3,36 +3,41 @@ # 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 +class staticsync::static_master ( +) { + include staticsync::base + include staticsync::srvdir # masters need to talk to mirrors and sources and themselves - class { 'roles::static::ssh': + class { 'staticsync::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', + source => 'puppet:///modules/staticsync/static-master-run', mode => '0555', } file { '/usr/local/bin/static-master-update-component': - source => 'puppet:///modules/roles/static-mirroring/static-master-update-component', + source => 'puppet:///modules/staticsync/static-master-update-component', mode => '0555', } - file { '/etc/static-clients.conf': - content => template('roles/static-mirroring/static-clients.conf.erb'), + concat { '/etc/static-clients.conf': + ensure_newline => true, + warn => @(EOF), + ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE. + | EOF } + Concat::Fragment <<| tag == 'staticsync::static-mirrors-to-trigger' |>> - file { '/home/staticsync/static-master': + file { "/home/${staticsync::user}/static-master": ensure => link, - target => '/srv/static.debian.org', + target => $staticsync::basedir, } - file { '/srv/static.debian.org/master': + file { "${staticsync::basedir}/master": ensure => directory, mode => '0755', - owner => 'staticsync', - group => 'staticsync', + owner => $staticsync::user, + group => $staticsync::user, } }