Puppet Class: rsync

Defined in:
manifests/init.pp

Overview

Provides an rsync client library with a stub exec for certain edge cases

Parameters:

  • sebool_anon_write (Boolean) (defaults to: false)

    Allow anonymous rsync users to write to shares

    • Share spaces must be labeled as “public_content_rw_t“

    • Only functional if “selinux“ is not disabled

  • sebool_client (Boolean) (defaults to: true)

    Allow rsync to act as a client

    • Only functional if “selinux“ is not disabled

  • sebool_export_all_ro (Boolean) (defaults to: true)

    Allow rsync to export of anything on the system as read only

    • Only functional if “selinux“ is not disabled

  • sebool_full_access (Boolean) (defaults to: false)

    Allow rsync management of ALL files on the system

    • Only functional if “selinux“ is not disabled

  • sebool_use_nfs (Boolean) (defaults to: false)

    Allow rsync servers to share nfs files systems

    • Only functional if “selinux“ is not disabled

    • Only applies to El6

    • WARNING: Will be removed in version 7 of this module

  • sebool_use_cifs (Boolean) (defaults to: false)

    Allow rsync servers to share cifs files systems

    • Only functional if “selinux“ is not disabled

    • Only applies to El6

    • WARNING: Will be removed in version 7 of this module

  • package_ensure (String) (defaults to: simplib::lookup('simp_options::package_ensure', { 'default_value' => 'installed' }))

    The ensure status of the package to be managed

Author:



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'manifests/init.pp', line 42

class rsync (
  Boolean $sebool_anon_write    = false,
  Boolean $sebool_client        = true,
  Boolean $sebool_export_all_ro = true,
  Boolean $sebool_full_access   = false,
  Boolean $sebool_use_nfs       = false,
  Boolean $sebool_use_cifs      = false,
  String  $package_ensure       = simplib::lookup('simp_options::package_ensure', { 'default_value' => 'installed' }),
) {
  simplib::assert_metadata($module_name)

  package { 'rsync':
    ensure => $package_ensure
  }

  file { '/etc/rsync':
    ensure => 'directory',
    owner  => 'root',
    group  => 'root',
    mode   => '0640',
    purge  => true
  }

  if $facts['os']['selinux']['current_mode'] and $facts['os']['selinux']['current_mode'] != 'disabled' {
    include 'rsync::selinux'
  }
}