Defined Type: rsync::server::module

Defined in:
manifests/server/module.pp

Overview

Definition: rsync::server::module

sets up a rsync server

Examples:

rsync::server::module { 'repo':
  path    => $base,
  require => File[$base],
}

Parameters:

  • path (String)

    path to data

  • comment (Optional[String]) (defaults to: undef)

    rsync comment

  • read_only (Boolean) (defaults to: true)

    yes||no, defaults to yes

  • write_only (Boolean) (defaults to: false)

    yes||no, defaults to no

  • use_chroot (Boolean) (defaults to: true)

    yes|no, defaults to undef

  • list (Boolean) (defaults to: true)

    yes||no, defaults to yes

  • uid (String) (defaults to: '0')

    uid of rsync server, defaults to 0

  • gid (String) (defaults to: '0')

    gid of rsync server, defaults to 0

  • incoming_chmod (Variant[Boolean,String]) (defaults to: '0644')

    incoming file mode, defaults to 0644

  • outgoing_chmod (Variant[Boolean,String]) (defaults to: '0644')

    outgoing file mode, defaults to 0644

  • max_connections (Variant[Integer,String]) (defaults to: '0')

    maximum number of simultaneous connections allowed, defaults to 0

  • lock_file (String) (defaults to: '/var/run/rsyncd.lock')

    file used to support the max connections parameter, defaults to /var/run/rsyncd.lock only needed if max_connections > 0

  • secrets_file (Optional[String]) (defaults to: undef)

    path to the file that contains the username:password pairs used for authenticating this module

  • auth_users (Optional[Array]) (defaults to: undef)

    list of usernames that will be allowed to connect to this module

  • hosts_allow (Optional[Array]) (defaults to: undef)

    list of patterns allowed to connect to this module (man 5 rsyncd.conf for details)

  • hosts_deny (Optional[Array]) (defaults to: undef)

    list of patterns allowed to connect to this module (man 5 rsyncd.conf for details)

  • transfer_logging (Boolean) (defaults to: false)

    parameter enables per-file logging of downloads and uploads in a format somewhat similar to that used by ftp daemons.

  • log_format (Optional[String]) (defaults to: undef)

    This parameter allows you to specify the format used for logging file transfers when transfer logging is enabled. See the rsyncd.conf documentation for more details.

  • refuse_options (Optional[Array]) (defaults to: undef)

    list of rsync command line options that will be refused by your rsync daemon.

  • log_file (Optional[String]) (defaults to: undef)

    log messages to the indicated file rather than using syslog

  • dont_compress (Optional[Array[String]]) (defaults to: undef)

    wildcard patterns that should not be compressed when pulling files from the daemon

  • order (String) (defaults to: '10')

    concat::fragment order

  • exclude (Optional[Array]) (defaults to: undef)

    space-separated list of daemon exclude patterns.

  • pre_xfer_exec (Optional[String]) (defaults to: undef)

    command to be run before and/or after the transfer.

  • post_xfer_exec (Optional[String]) (defaults to: undef)

    command to be run before and/or after the transfer.

  • ignore_nonreadable (Boolean) (defaults to: false)
  • reverse_lookup (Boolean) (defaults to: true)

    Controls whether the daemon performs a reverse lookup on the client’s IP address to determine its hostname, which is used for “hosts allow”/“hosts deny” checks and the “%h” log escape.



40
41
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'manifests/server/module.pp', line 40

define rsync::server::module (
  String                   $path,
  String                   $order              = '10',
  Optional[String]         $comment            = undef,
  Boolean                  $read_only          = true,
  Boolean                  $write_only         = false,
  Boolean                  $list               = true,
  String                   $uid                = '0',
  String                   $gid                = '0',
  Variant[Boolean,String]  $incoming_chmod     = '0644',
  Variant[Boolean,String]  $outgoing_chmod     = '0644',
  Variant[Integer,String]  $max_connections    = '0',
  String                   $lock_file          = '/var/run/rsyncd.lock',
  Boolean                  $use_chroot         = true,
  Optional[String]         $secrets_file       = undef,
  Optional[Array]          $exclude            = undef,
  Optional[Array]          $auth_users         = undef,
  Optional[Array]          $hosts_allow        = undef,
  Optional[Array]          $hosts_deny         = undef,
  Optional[String]         $pre_xfer_exec      = undef,
  Optional[String]         $post_xfer_exec     = undef,
  Boolean                  $transfer_logging   = false,
  Optional[String]         $log_format         = undef,
  Optional[Array]          $refuse_options     = undef,
  Boolean                  $ignore_nonreadable = false,
  Optional[String]         $log_file           = undef,
  Optional[Array[String]]  $dont_compress      = undef,
Boolean                  $reverse_lookup     = true,) {
  concat::fragment { "frag-${name}":
    content => epp('rsync/module.epp', {
        'name'               => $name,
        'path'               => $path,
        'order'              => $order,
        'comment'            => $comment,
        'read_only'          => $read_only,
        'write_only'         => $write_only,
        'use_chroot'         => $use_chroot,
        'list'               => $list,
        'uid'                => $uid,
        'gid'                => $gid,
        'incoming_chmod'     => $incoming_chmod,
        'outgoing_chmod'     => $outgoing_chmod,
        'max_connections'    => $max_connections,
        'lock_file'          => $lock_file,
        'secrets_file'       => $secrets_file,
        'exclude'            => $exclude,
        'auth_users'         => $auth_users,
        'hosts_allow'        => $hosts_allow,
        'hosts_deny'         => $hosts_deny,
        'transfer_logging'   => $transfer_logging,
        'log_format'         => $log_format,
        'refuse_options'     => $refuse_options,
        'ignore_nonreadable' => $ignore_nonreadable,
        'log_file'           => $log_file,
        'pre_xfer_exec'      => $pre_xfer_exec,
        'post_xfer_exec'     => $post_xfer_exec,
        'dont_compress'      => $dont_compress,
        'reverse_lookup'     => $reverse_lookup,
    }),
    target  => $rsync::server::conf_file,
    order   => $order,
  }
}