Skip to content

Latest commit

 

History

History
585 lines (328 loc) · 12.5 KB

REFERENCE.md

File metadata and controls

585 lines (328 loc) · 12.5 KB

Reference

Table of Contents

Classes

  • rsync: install rsync package and create rsync::put/get instances
  • rsync::server: The rsync server. Supports both standard rsync as well as rsync over ssh

Defined types

Classes

rsync

install rsync package and create rsync::put/get instances

Examples

class { 'rsync':
  package_ensure => 'latest'
}

Parameters

The following parameters are available in the rsync class:

package_ensure

Data type: String

ensure parameter for package-resource

Default value: 'installed'

manage_package

Data type: Boolean

whether to manage the package-resource

Default value: true

puts

Data type: Hash

rsync::put instances to create

Default value: {}

gets

Data type: Hash

rsync::get instances to create

Default value: {}

rsync::server

The rsync server. Supports both standard rsync as well as rsync over ssh

Parameters

The following parameters are available in the rsync::server class:

use_xinetd

Data type: Boolean

wether to run in xinetd or standaloie

Default value: true

address

Data type: String

adress to listen to

Default value: '0.0.0.0'

use_chroot

Data type: Boolean

witch for rsync config option "use chrot"

Default value: true

uid

Data type: String

uid to run the deamon as

Default value: 'nobody'

gid

Data type: String

gid to run the deamon as

Default value: 'nobody'

port

Data type: String

tcp port to listen to

Default value: '873'

modules

Data type: Hash

hash of rsync::server::module resources to create

Default value: {}

syslog_facility

Data type: String

syslog facitlity to set for logging

Default value: 'local3'

Defined types

rsync::get

get files via rsync ussing exec

Examples

rsync::get { '/foo':
  source  => "rsync://${rsync_server}/repo/foo/",
  require => File['/foo'],
}

Parameters

The following parameters are available in the rsync::get defined type:

source

Data type: String

source to copy from

path

Data type: String

path to copy to

Default value: $name

user

Data type: Optional[String]

username on remote system

Default value: undef

keyfile

Data type: String

path to ssh key used to connect to remote host

Default value: "/home/${user}/.ssh/id_rsa"

timeout

Data type: String

timeout in seconds

Default value: '900'

execuser

Data type: String

user to run the command (passed to exec)

Default value: 'root'

options

Data type: String

commandline options to pass to rsync (-a)

Default value: '-a'

onlyif

Data type: Optional[String]

Condition to run the rsync command

Default value: undef

rsync::put

put files via rsync ussing exec

Examples

rsync::put { '${rsyncDestHost}:/repo/foo':
  user    => 'user',
  source  => "/repo/foo/",
}

Parameters

The following parameters are available in the rsync::put defined type:

source

Data type: String

source to copy from

path

Data type: Optional[String]

path to copy to

Default value: undef

user

Data type: Optional[String]

username on remote system

Default value: undef

keyfile

Data type: String

path to ssh key used to connect to remote host

Default value: "/home/${user}/.ssh/id_rsa"

timeout

Data type: String

timeout in seconds

Default value: '900'

options

Data type: String

commandline options to pass to rsync (-a)

Default value: '-a'

rsync::server::module

Definition: rsync::server::module

sets up a rsync server

Examples

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

Parameters

The following parameters are available in the rsync::server::module defined type:

path

Data type: String

path to data

comment

Data type: Optional[String]

rsync comment

Default value: undef

read_only

Data type: Boolean

yes||no, defaults to yes

Default value: true

write_only

Data type: Boolean

yes||no, defaults to no

Default value: false

use_chroot

Data type: Boolean

yes|no, defaults to undef

Default value: true

list

Data type: Boolean

yes||no, defaults to yes

Default value: true

uid

Data type: String

uid of rsync server, defaults to 0

Default value: '0'

gid

Data type: String

gid of rsync server, defaults to 0

Default value: '0'

incoming_chmod

Data type: Variant[Boolean,String]

incoming file mode, defaults to 0644

Default value: '0644'

outgoing_chmod

Data type: Variant[Boolean,String]

outgoing file mode, defaults to 0644

Default value: '0644'

max_connections

Data type: Variant[Integer,String]

maximum number of simultaneous connections allowed, defaults to 0

Default value: '0'

lock_file

Data type: String

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

Default value: '/var/run/rsyncd.lock'

secrets_file

Data type: Optional[String]

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

Default value: undef

auth_users

Data type: Optional[Array]

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

Default value: undef

hosts_allow

Data type: Optional[Array]

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

Default value: undef

hosts_deny

Data type: Optional[Array]

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

Default value: undef

transfer_logging

Data type: Boolean

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

Default value: false

log_format

Data type: Optional[String]

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.

Default value: undef

refuse_options

Data type: Optional[Array]

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

Default value: undef

log_file

Data type: Optional[String]

log messages to the indicated file rather than using syslog

Default value: undef

dont_compress

Data type: Optional[Array[String]]

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

Default value: undef

order

Data type: String

concat::fragment order

Default value: '10'

exclude

Data type: Optional[Array]

space-separated list of daemon exclude patterns.

Default value: undef

pre_xfer_exec

Data type: Optional[String]

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

Default value: undef

post_xfer_exec

Data type: Optional[String]

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

Default value: undef

ignore_nonreadable

Data type: Boolean

Default value: false

reverse_lookup

Data type: Boolean

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.

Default value: true