Resource Type: rsync
- Defined in:
- lib/puppet/type/rsync.rb
- Providers:
-
rsync
Overview
Run an rsync command; almost all options are directly from the rsync man page.
Though we’ve done what we can to mimize SELinux impact. If you have the situation where your Puppet server’s rsync space does not have SELinux attributes but your client is Permissive or Enforcing. Then you will most certainly see error messages of the type that extended attributes have changed.
Your best bet is to ensure that your Puppet server runs in at least Permissive mode. If you need to refresh your rsync data attributes, then running ‘fixfiles -R simp-rsync restore’.
Properties
-
action
(defaults to: pull)
Whether to push or pull from rsync server. Defaults to pull
Supported values:- push
- pull
Parameters
-
bwlimit
KB/s to limit I/O bandwidth to
-
compress
(defaults to: true)
Whether or not to compress content prior to transfer. Defaults to true.
Supported values:- true
- false
-
contimeout
Connection timeout in seconds.
-
copy_links
(defaults to: false)
Whether to copy links as symlinks. Defaults to false
Supported values:- true
- false
-
delete
(defaults to: false)
Whether to delete files that do not exist on server. Defaults to false
Supported values:- true
- false
-
exclude
(defaults to: ['.svn/','.git/'])
Exclude files matching PATTERN. Multiple values may be specified as an array. Defaults to [‘.svn/’,‘.git/’]
-
hard_links
(defaults to: true)
Preserve hard links. Defaults to true.
Supported values:- true
- false
-
ignore_selinux
(defaults to: true)
If this is set to ‘true’ then this type will ignore SELinux errors. If set to false, then an SELinux permissions copy error is a complete failure state.
Supported values:- true
- false
-
iotimeout
I/O timeout in seconds.
-
logoutput
(defaults to: on_failure)
Whether to log output. Defaults to logging output at the loglevel for the ‘exec` resource. Use on_failure to only log the output when the command reports an error. Values are true, false, on_failure, and any legal log level.
Supported values:- true
- false
- on_failure
-
name (namevar)
The globally unique name of the resource. Has no effect on provider functionality.
-
no_implied_dirs
(defaults to: true)
Do not send implied dirs. Defaults to true
Supported values:- true
- false
-
pass
The password to use. Only used if a username is specified If you want the password to be auto-generated, you can use the SIMP ‘simplib::passgen’ function.
$user = 'foo' rsync::retrieve { \"foo\": source => 'bar', target => '/tmp/foo', server => 'puppet', user => $user, password => simplib::passgen($user) }
-
password
The password to use. Only used if a username is specified If you want the password to be auto-generated, you can use the SIMP ‘simplib::passgen’ function.
$user = 'foo' rsync::retrieve { \"foo\": source => 'bar', target => '/tmp/foo', server => 'puppet', user => $user, password => simplib::passgen($user) }
-
path
The fully qualified path to the rsync executable
-
preserve_acl
(defaults to: true)
Whether or not to preserve ACL. Defaults to true.
Supported values:- true
- false
-
preserve_devices
(defaults to: false)
Whether or not to preserve device files. Defaults to false.
Supported values:- true
- false
-
preserve_group
(defaults to: true)
Whether or not to preserve group. Defaults to true.
Supported values:- true
- false
-
preserve_owner
(defaults to: true)
Whether or not to preserve owner. Defaults to true.
Supported values:- true
- false
-
preserve_perms
(defaults to: true)
Whether or not to preserve permissions. Defaults to true.
Supported values:- true
- false
-
preserve_xattrs
(defaults to: true)
Whether or not to preserve extended attributes. Defaults to true.
Supported values:- true
- false
-
proto
The protocol to use in connecting to the rsync server. Defaults to “rsync”
-
protocol
The protocol to use in connecting to the rsync server. Defaults to “rsync”
-
provider
The specific backend to use for this ‘rsync` resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.
-
recurse
(defaults to: true)
Whether or not to recursively copy. Defaults to true.
Supported values:- true
- false
-
rsync_path
The fully qualified path to the rsync executable
-
rsync_server
The hostname or IP of the rsync server
-
rsync_timeout
Alias for :timeout
-
server
The hostname or IP of the rsync server
-
size_only
(defaults to: false)
Whether to skip files that match in size. Defaults to true
Supported values:- true
- false
-
source
The fully qualified source path on the rsync server
-
source_path
The fully qualified source path on the rsync server
-
target
The fully qualified target path on the rsync client
-
target_path
The fully qualified target path on the rsync client
-
timeout
Connection timeout in seconds. Note: This is different from what the man page states due to backward compatibility issues. Use iotimeout for the man page compatible timeout value.
-
user
The username to use