Puppet Class: deployment::rsync
- Defined in:
- modules/deployment/manifests/rsync.pp
Overview
Class deployment::rsync
Simple class to allow syncing of the deployment directory.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'modules/deployment/manifests/rsync.pp', line 5
class deployment::rsync(
Stdlib::Fqdn $deployment_server,
Array[Stdlib::Fqdn] $deployment_hosts = [],
Stdlib::Unixpath $deployment_path = '/srv/deployment',
Stdlib::Unixpath $patches_path = '/srv/patches',
){
if $deployment_hosts.length > 0
{
rsync::quickdatacopy { 'deployment_home':
source_host => $deployment_server,
dest_host => $deployment_hosts,
module_path => '/home',
auto_sync => false,
server_uses_stunnel => true,
}
rsync::quickdatacopy { 'deployment_module':
source_host => $deployment_server,
dest_host => $deployment_hosts,
module_path => $deployment_path,
auto_sync => true,
delete => true,
auto_interval => [
{
'start' => 'OnBootSec', # initially start the unit
'interval' => '10sec',
},{
'start' => 'OnCalendar',
'interval' => '*-*-* *:00:00', # then hourly on the hour
},
],
server_uses_stunnel => true,
}
rsync::quickdatacopy { 'patches_module':
source_host => $deployment_server,
dest_host => $deployment_hosts,
module_path => $patches_path,
auto_sync => true,
delete => true,
auto_interval => [
{
'start' => 'OnBootSec', # initially start the unit
'interval' => '15sec',
},{
'start' => 'OnCalendar',
'interval' => '*-*-* *:30:00', # then hourly on the half hour
},
],
server_uses_stunnel => true,
}
}
}
|