Skip to content

Latest commit

 

History

History
81 lines (66 loc) · 1.8 KB

File metadata and controls

81 lines (66 loc) · 1.8 KB

thmeier-rsync

fork of puppetlabs-rsync with some minor features added

Table of Contents

  1. Module Description - What does the module do?
  2. Usage - Configuration options and additional functionality
  3. Reference - An under-the-hood peek at what the module is doing and how
  4. Limitations - OS compatibility, etc.

Module description

puppetlabs-rsync manages rsync clients, repositories, and servers as well as providing defines to easily grab data via rsync.

Usage

Install the latest version of rsync

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

Get file 'foo' via rsync

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

Put file 'foo' on 'rsyncDestHost'

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

Setup default rsync repository

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

To disable default values for incoming_chmod and outgoing_chmod, and do not add empty values to the resulting config, set both values to false

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

Configuring via Hiera

rsync::put, rsync::get, and rsync::server::module resources can be configured using Hiera hashes. For example:

rsync::server::modules:
  myrepo:
    path: /mypath
    incoming_chmod: false
    outgoing_chmod: false
  myotherrepo:
    path: /otherpath
    read_only: false

Reference

See REFERENCE.md