{"id":15022661,"url":"https://github.com/puppetlabs/puppetlabs-rsync","last_synced_at":"2025-05-15T06:02:41.826Z","repository":{"id":2961660,"uuid":"3976218","full_name":"puppetlabs/puppetlabs-rsync","owner":"puppetlabs","description":"rsync module","archived":false,"fork":false,"pushed_at":"2025-02-04T02:05:20.000Z","size":223,"stargazers_count":49,"open_issues_count":20,"forks_count":126,"subscribers_count":168,"default_branch":"main","last_synced_at":"2025-04-14T08:14:35.384Z","etag":null,"topics":["module","trusted-contributor"],"latest_commit_sha":null,"homepage":"forge.puppetlabs.com/puppetlabs/rsync","language":"Ruby","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/puppetlabs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-04-09T21:33:02.000Z","updated_at":"2024-08-23T06:13:38.000Z","dependencies_parsed_at":"2025-02-28T21:16:49.879Z","dependency_job_id":null,"html_url":"https://github.com/puppetlabs/puppetlabs-rsync","commit_stats":{"total_commits":126,"total_committers":57,"mean_commits":2.210526315789474,"dds":0.9206349206349207,"last_synced_commit":"771aa037de64b256875801c76d2df8841e33118e"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetlabs-rsync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetlabs-rsync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetlabs-rsync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetlabs-rsync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/puppetlabs","download_url":"https://codeload.github.com/puppetlabs/puppetlabs-rsync/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254283336,"owners_count":22045140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["module","trusted-contributor"],"created_at":"2024-09-24T19:58:14.788Z","updated_at":"2025-05-15T06:02:41.762Z","avatar_url":"https://github.com/puppetlabs.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# puppetlabs-rsync #\n\n\u003e [!NOTE]\n\u003e This module is supported by the Puppet community. We expect it to be of the same high\n\u003e quality as our own Supported modules, but it does not qualify for Puppet Support plans.\n\u003e See the `CODEOWNERS` file for usernames of the maintainers.\n\n#### Table of Contents\n\n1. [Module Description - What does the module do?](#module-description)\n3. [Usage - Configuration options and additional functionality](#usage)\n4. [Reference - An under-the-hood peek at what the module is doing and how](#reference)\n    * [Classes](#classes)\n    * [Defined Types](#defined-types)\n5. [Limitations - OS compatibility, etc.](#limitations)\n\n## Module description\n\npuppetlabs-rsync manages rsync clients, repositories, and servers as well as\nproviding defines to easily grab data via rsync.\n\n## Usage\n\nInstall the latest version of rsync\n~~~puppet\nclass { 'rsync':\n  package_ensure =\u003e 'latest'\n}\n~~~\n\nGet file 'foo' via rsync\n~~~puppet\nrsync::get { '/foo':\n  source  =\u003e \"rsync://${rsyncServer}/repo/foo/\",\n  require =\u003e File['/foo'],\n}\n~~~\n\nPut file 'foo' on 'rsyncDestHost'\n~~~puppet\nrsync::put { '${rsyncDestHost}:/repo/foo':\n  user    =\u003e 'user',\n  source  =\u003e \"/repo/foo/\",\n}\n~~~\n\nSetup default rsync repository\n~~~puppet\nrsync::server::module{ 'repo':\n  path    =\u003e $base,\n  require =\u003e File[$base],\n}\n~~~\n\nTo disable default values for `incoming_chmod` and `outgoing_chmod`, and\ndo not add empty values to the resulting config, set both values to `false`\n\n~~~puppet\nrsync::server::module { 'repo':\n  path           =\u003e $base,\n  incoming_chmod =\u003e false,\n  outgoing_chmod =\u003e false,\n  require        =\u003e File[$base],\n}\n~~~\n\n#### Configuring via Hiera\n`rsync::put`, `rsync::get`, and `rsync::server::module` resources can be\nconfigured using Hiera hashes. For example:\n\n~~~yaml\nrsync::server::modules:\n  myrepo:\n    path: /mypath\n    incoming_chmod: false\n    outgoing_chmod: false\n  myotherrepo:\n    path: /otherpath\n    read_only: false\n~~~\n\n## Reference\n\n**Classes:**\n* [rsync](#rsync)\n\n**Defined Types:**\n* [rsync::get](#rsyncget)\n* [rsync::put](#rsyncput)\n* [rsync::server::module](#rsyncservermodule)\n\n\n### Classes\n\n#### rsync\n\nManage the rsync package.\n\n##### `package_ensure`\n\nEnsure the for the rsync package. Any of the valid values for the package resource (present, absent, purged, held, latest) are acceptable.\n\nDefault value: 'installed'\n\n##### `manage_package`\n\nSetting this to false stops the rsync package resource from being managed.\n\nDefault value: `true`\n\n### Defined Types\n\n#### rsync::get\n\nget files via rsync\n\n##### `source`\n**Required**\n\nSource to copy from.\n\n##### `path`\n\nPath to copy to.\n\nDefault value: `$name`\n\n##### `user`\n\nUsername on remote system\n\n##### `purge`\n\nIf set, rsync will use '--delete'\n\n##### `recursive`\n\nIf set, rsync will use '-r'\n\n##### `links`\n\nIf set, rsync will use '--links'\n\n##### `hardlinks`\n\nIf set, rsync will use '--hard-links'\n\n##### `copylinks`\n\nIf set, rsync will use '--copy-links'\n\n##### `times`\n\nIf set, rsync will use '--times'\n\n##### `exclude`\n\nString (or array of strings) paths for files to be excluded.\n\n##### `include`\n\nString (or array of strings) paths for files to be explicitly included.\n\n##### `exclude_first`\n\nIf `true`, exclude first and then include; the other way around if `false`.\n\nDefault value: `true`\n\n##### `keyfile`\n\nSSH key used to connect to remote host.\n\n##### `timeout`\n\nTimeout in seconds.\n\nDefault value: 900\n\n##### `execuser`\n\nUser to run the command (passed to exec).\n\n##### `options`\n\nDefault options to pass to rsync (-a).\n\n##### `chown`\n\nUSER:GROUP simple username/groupname mapping.\n\n##### `chmod`\n\nFile and/or directory permissions.\n\n##### `logfile`\n\nLog file name.\n\n##### `onlyif`\n\nCondition to run the rsync command.\n\n#### rsync::put\n\nput files via rsync\n\n##### `source`\n**Required**\n\nSource to copy from.\n\n##### `path`\n\nPath to copy to.\n\nDefault value: `$name`\n\n##### `user`\n\nUsername on target remote system.\n\n##### `purge`\n\nIf set, rsync will use '--delete'\n\n##### `exclude`\n\nString (or array of strings) paths for files to be excluded.\n\n##### `include`\n\nString (or array of strings) paths for files to be explicitly included.\n\n##### `exclude_first`\n\nIf `true`, exclude first and then include; the other way around if `false`.\n\nDefault value: `true`\n\n##### `keyfile`\n\nPath to SSH key used to connect to remote host.\n\nDefault value: '/home/${user}/.ssh/id_rsa'\n\n##### `timeout`\n\nTimeout in seconds.\n\nDefault value: 900\n\n##### `options`\n\nDefault options to pass to rsync (-a)\n\n#### rsync::server::module\n\nSets up a rsync server\n\n##### `path`\n_Required_\n\nPath to data.\n\n##### `comment`\n\nRsync comment.\n\n##### `motd`\n\nFile containing motd info.\n\n##### `pid_file`\n\nPID file. Defaults to /var/run/rsyncd.pid. The pid file parameter won't be applied if set to \"UNSET\"; rsyncd will not use a PID file in this case.\n\n##### `read_only`\n\nyes||no\n\nDefault value: 'yes'\n\n##### `write_only`\n\nyes||no\n\nDefault value: 'no'\n\n##### `list`\n\nyes||no\n\nDefault value: 'no'\n\n##### `uid`\n\nuid of rsync server\n\nDefault value: 0\n\n##### `gid`\n\ngid of rsync server\n\nDefault value: 0\n\n##### `incoming_chmod`\n\nIncoming file mode\n\nDefault value: '644'\n\n##### `outgoing_chmod`\n\nOutgoing file mode\n\nDefault value: '644'\n\n##### `max_connections`\n\nMaximum number of simultaneous connections allowed\n\nDefault value: 0\n\n##### `lock_file`\n\nFile used to support the max connections parameter. Only needed if max_connections \u003e 0.\n\nDefault value: '/var/run/rsyncd.lock'\n\n##### `secrets_file`\n\nPath to the file that contains the username:password pairs used for authenticating this module.\n\n##### `auth_users`\n\nList of usernames that will be allowed to connect to this module (must be undef or an array).\n\n##### `hosts_allow`\n\nList of patterns allowed to connect to this module ([rsyncd.conf man page] for details, must be undef or an array).\n\n##### `hosts_deny`\n\nList of patterns allowed to connect to this module ([rsyncd.conf man page] for details, must be undef or an array).\n\n##### `transfer_logging`\n\nParameter enables per-file logging of downloads and uploads in a format somewhat similar to that used by ftp daemons.\n\n##### `log_format`\n\nThis parameter allows you to specify the format used for logging file transfers when transfer logging is enabled. See the [rsyncd.conf man page] for more details.\n\n##### `refuse_options`\n\nList of rsync command line options that will be refused by your rsync daemon.\n\n##### `ignore_nonreadable`\n\nThis  tells  the  rsync daemon to completely ignore files that are not readable by the user.\n=======\n## Parameters: ##\n    $source        - source to copy from\n    $path          - path to copy to, defaults to $name\n    $user          - username on remote system\n    $purge         - if set, rsync will use '--delete'\n    $exclude       - string (or array) to be excluded\n    $include       - string (or array) to be included\n    $exclude_first - if 'true' (default) then first exclude and then include; the other way around if 'false'\n    $keyfile       - path to ssh key used to connect to remote host, defaults to /home/${user}/.ssh/id_rsa\n    $timeout       - timeout in seconds, defaults to 900\n    $options       - default options to pass to rsync (-a)\n\n## Actions: ##\n  put files via rsync\n\n## Requires: ##\n  $source must be set\n\n## Sample Usage: ##\n    rsync::put { '${rsyncDestHost}:/repo/foo':\n      user    =\u003e 'user',\n      source  =\u003e \"/repo/foo/\",\n    }\n\n# Definition: rsync::server::module #\n\nsets up a rsync server\n\n## Parameters: ##\n    $path            - path to data\n    $comment         - rsync comment\n    $use_chroot      - yes||no, defaults to yes\n    $motd            - file containing motd info\n    $read_only       - yes||no, defaults to yes\n    $write_only      - yes||no, defaults to no\n    $list            - yes||no, defaults to no\n    $uid             - uid of rsync server, defaults to 0\n    $gid             - gid of rsync server, defaults to 0\n    $numeric_ids     - don't resolve uids to usernames, defaults to yes\n    $incoming_chmod  - incoming file mode, defaults to 644\n    $outgoing_chmod  - outgoing file mode, defaults to 644\n    $max_connections - maximum number of simultaneous connections allowed, defaults to 0\n    $timeout         - disconnect client after X seconds of inactivity, defaults to 0\n    $lock_file       - file used to support the max connections parameter, defaults to /var/run/rsyncd.lock only needed if max_connections \u003e 0\n    $secrets_file    - path to the file that contains the username:password pairs used for authenticating this module\n    $auth_users      - list of usernames that will be allowed to connect to this module (must be undef or an array)\n    $hosts_allow     - list of patterns allowed to connect to this module (man 5 rsyncd.conf for details, must be undef or an array)\n    $hosts_deny      - list of patterns allowed to connect to this module (man 5 rsyncd.conf for details, must be undef or an array)\n    $transfer_logging - parameter enables per-file logging of downloads and uploads in a format somewhat similar to that used by ftp daemons.\n    $log_file         - log messages to the indicated file rather than using syslog\n    $log_format       - 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.\n    $refuse_options  - list of rsync command line options that will be refused by your rsync daemon.\n    $include         - list of files to include\n    $include_from    - file containing a list of files to include\n    $exclude         - list of files to exclude\n    $exclude_from    - file containing a list of files to exclude\n    $dont_compress   - disable compression on matching files\n    $ignore_nonreadable - This  tells  the  rsync daemon to completely ignore files that are not readable by the user.\n\n## Actions: ##\n  sets up an rsync server\n\n## Requires: ##\n  $path must be set\n\n## Sample Usage: ##\n    # setup default rsync repository\n    rsync::server::module{ 'repo':\n      path    =\u003e $base,\n      require =\u003e File[$base],\n    }\n\nTo disable default values for ``incoming_chmod`` and ``outgoing_chmod``, and\ndo not add empty values to the resulting config, set both values to ``false``\n\n    rsync::server::module { 'repo':\n      path           =\u003e $base,\n      incoming_chmod =\u003e false,\n      outgoing_chmod =\u003e false,\n      require        =\u003e File[$base],\n    }\n\n# Configuring via Hiera #\n``rsync::put``, ``rsync::get``, and ``rsync::server::module`` resources can be\nconfigured using Hiera hashes. For example:\n\n[rsyncd.conf man page]:https://download.samba.org/pub/rsync/rsyncd.conf.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuppetlabs%2Fpuppetlabs-rsync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpuppetlabs%2Fpuppetlabs-rsync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuppetlabs%2Fpuppetlabs-rsync/lists"}