23f81a34cb
This allows the rsync puppet container to deploy on its own. Additionally, fixed package and service definitions to allow xinetd to be defined only in this class. Change-Id: I599c6eb61eabd64bae1c8c13e93ea4053ca8eaa8
44 lines
906 B
Puppet
44 lines
906 B
Puppet
class nailgun::puppetsync(
|
|
$puppet_folder = '/etc/puppet',
|
|
$xinetd_config = '/etc/xinetd.d/rsync',
|
|
$rsync_config = '/etc/rsyncd.conf',
|
|
){
|
|
|
|
File {
|
|
ensure => present,
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0644',
|
|
}
|
|
|
|
file { 'rsync_conf' :
|
|
path => $rsync_config,
|
|
content => template('nailgun/rsyncd.conf.erb'),
|
|
}
|
|
|
|
file { 'rsync_xinetd' :
|
|
path => $xinetd_config,
|
|
content => template('nailgun/rsyncd_xinetd.erb'),
|
|
}
|
|
|
|
if !defined(Package['xinetd']) {
|
|
package { 'xinetd':
|
|
ensure => installed,
|
|
}
|
|
}
|
|
if !defined(Package['rsync']) {
|
|
package { 'rsync':
|
|
ensure => installed,
|
|
}
|
|
}
|
|
if ! defined(Service['xinetd']) {
|
|
service { 'xinetd':
|
|
ensure => running,
|
|
enable => true,
|
|
require => Package['xinetd'],
|
|
}
|
|
}
|
|
|
|
Package['rsync'] -> File['rsync_conf', 'rsync_xinetd'] ~> Service['xinetd']
|
|
}
|