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

Parameters:

  • server (Any)
  • cron_ensure (Any) (defaults to: 'absent')
  • frontends (Array[String]) (defaults to: [])


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
# File 'modules/puppetmaster/manifests/rsync.pp', line 5

class puppetmaster::rsync(
    $server,
    $cron_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';
    }

    cron { 'sync_volatile':
        ensure  => $cron_ensure,
        command => "/usr/bin/rsync -avz --delete ${server}::puppet_volatile /var/lib/puppet/volatile > /dev/null 2>&1",
        minute  => '*/15',
    }

    cron { 'sync_ca':
        ensure  => $cron_ensure,
        command => "/usr/bin/rsync -avz --delete ${server}::puppet_ca /var/lib/puppet/server/ssl/ca > /dev/null 2>&1",
        hour    => '4',
    }
}