From 35b615195b29dfcd1e15f6bed46db655e5a55688 Mon Sep 17 00:00:00 2001 From: "Vladmir Sharhsov(warpc)" Date: Thu, 24 Oct 2013 17:18:29 +0400 Subject: [PATCH] Fix for Rsync daemon --- .../puppet/cobbler/templates/xinetd.conf.erb | 2 -- .../puppet/nailgun/manifests/puppetsync.pp | 25 ++++++++++++------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/deployment/puppet/cobbler/templates/xinetd.conf.erb b/deployment/puppet/cobbler/templates/xinetd.conf.erb index cfc2351649..0a90f33518 100644 --- a/deployment/puppet/cobbler/templates/xinetd.conf.erb +++ b/deployment/puppet/cobbler/templates/xinetd.conf.erb @@ -1,7 +1,5 @@ defaults { - enabled = tftp - log_type = SYSLOG daemon info log_on_failure = HOST log_on_success = PID HOST DURATION EXIT diff --git a/deployment/puppet/nailgun/manifests/puppetsync.pp b/deployment/puppet/nailgun/manifests/puppetsync.pp index 3338222d70..878e7fd374 100644 --- a/deployment/puppet/nailgun/manifests/puppetsync.pp +++ b/deployment/puppet/nailgun/manifests/puppetsync.pp @@ -1,25 +1,32 @@ class nailgun::puppetsync( $puppet_folder = '/etc/puppet', - $xinetd_folder = '/etc/xinet.d', + $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'), - owner => 'root', - group => 'root', - mode => '0644', } file { 'rsync_xinetd' : - path => "${xinetd_folder}/rsyncd.conf", + path => $xinetd_config, content => template('nailgun/rsyncd_xinetd.erb'), - owner => 'root', - group => 'root', - mode => '0644', + } + + if !defined(Package['rsync']) { + package { 'rsync': + ensure => installed, + } } - File['rsync_conf', 'rsync_xinetd'] ~> Service['xinetd'] + Package['rsync'] -> File['rsync_conf', 'rsync_xinetd'] ~> Service['xinetd'] } \ No newline at end of file