Puppet Class: puppetmaster::rsync
- Defined in:
- modules/puppetmaster/manifests/rsync.pp
Overview
Class puppetmaster::rsync
Simple class to allow syncing of the volatile and CA directories
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'modules/puppetmaster/manifests/rsync.pp', line 5
class puppetmaster::rsync(
String $server,
Wmflib::Ensure $sync_ensure = 'absent',
Array[String] $frontends = [],
){
rsync::server::module {
default:
read_only => 'yes',
hosts_allow => $frontends,
chroot => false;
'puppet_volatile':
path => '/var/lib/puppet/volatile';
'puppet_ca':
path => '/var/lib/puppet/server/ssl/ca';
}
systemd::timer::job { 'sync-puppet-volatile':
ensure => $sync_ensure,
user => 'root',
description => 'rsync puppet volatile data to another server',
command => "/usr/bin/rsync -avz --delete ${server}::puppet_volatile /var/lib/puppet/volatile",
interval => {'start' => 'OnUnitInactiveSec', 'interval' => '15m'},
monitoring_enabled => false,
logging_enabled => false,
}
systemd::timer::job { 'sync-puppet-ca':
ensure => $sync_ensure,
user => 'root',
description => 'rsync puppet CA data to another server',
command => "/usr/bin/rsync -avz --delete ${server}::puppet_ca /var/lib/puppet/server/ssl/ca",
interval => {'start' => 'OnUnitInactiveSec', 'interval' => 'daily'},
monitoring_enabled => false,
logging_enabled => false,
}
}
|