From: Peter Palfrader Date: Sat, 14 Sep 2019 14:39:34 +0000 (+0200) Subject: Switch to collected clients.conf X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=e6c868d2c076fc671a4f586d6f8a51653b48480d;p=mirror%2Fdsa-puppet.git Switch to collected clients.conf --- diff --git a/modules/staticsync/manifests/static_master.pp b/modules/staticsync/manifests/static_master.pp index 17efe762f..716b12c51 100644 --- a/modules/staticsync/manifests/static_master.pp +++ b/modules/staticsync/manifests/static_master.pp @@ -22,16 +22,13 @@ class staticsync::static_master ( source => 'puppet:///modules/staticsync/static-master-update-component', mode => '0555', } - file { '/etc/static-clients.conf': - content => template('staticsync/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 { '/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' |>> + Concat::Fragment <<| tag == 'staticsync::static-mirrors-to-trigger' |>> file { "/home/${staticsync::user}/static-master": ensure => link, diff --git a/modules/staticsync/templates/static-clients.conf.erb b/modules/staticsync/templates/static-clients.conf.erb deleted file mode 100644 index 6d2cd5bfe..000000000 --- a/modules/staticsync/templates/static-clients.conf.erb +++ /dev/null @@ -1,15 +0,0 @@ -## -## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE. -## - -<%= - -# do not include mirrors in static_mirror_nopush -static_mirror_nopush = scope.lookupvar('deprecated::roles')['static_mirror_nopush'] - -scope.lookupvar('deprecated::roles')['static_mirror'].reject{ |x| static_mirror_nopush.include?(x) }.join("\n") - -# vim:set et: -# vim:set sts=4 ts=4: -# vim:set shiftwidth=4: -%>