Puppet Class: dumps::rsync::common

Defined in:
modules/dumps/manifests/rsync/common.pp

Overview

Parameters:

  • user (Any) (defaults to: undef)
  • group (Any) (defaults to: undef)


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'modules/dumps/manifests/rsync/common.pp', line 1

class dumps::rsync::common(
    $user = undef,
    $group = undef,
) {
    require_package('rsync')

    file { '/etc/rsyncd.d':
        ensure => 'directory',
    }
    file { '/etc/rsyncd.d/00-globalopts.conf':
        ensure  => 'present',
        mode    => '0444',
        owner   => 'root',
        group   => 'root',
        content => template('dumps/rsync/rsyncd.conf.globalopts.erb'),
        notify  => Exec['update-rsyncd.conf'],
    }
    exec { 'update-rsyncd.conf':
        command     => '/bin/cat /etc/rsyncd.d/*.conf > /etc/rsyncd.conf',
        refreshonly => true,
        require     => File['/etc/rsyncd.d'],
    }
    service { 'rsync':
        ensure    => running,
        enable    => true,
        subscribe => [ Exec['update-rsyncd.conf'] ],
    }
}