diff --git a/manifests/get.pp b/manifests/get.pp index a448124..2d205db 100644 --- a/manifests/get.pp +++ b/manifests/get.pp @@ -53,7 +53,6 @@ $logfile = undef, $onlyif = undef, ) { - if $keyfile { $mykeyfile = $keyfile } else { @@ -155,7 +154,7 @@ exec { "rsync ${name}": command => "rsync -q ${rsync_options}", - path => [ '/bin', '/usr/bin', '/usr/local/bin' ], + path => ['/bin', '/usr/bin', '/usr/local/bin'], user => $execuser, # perform a dry-run to determine if anything needs to be updated # this ensures that we only actually create a Puppet event if something needs to diff --git a/manifests/init.pp b/manifests/init.pp index e275012..22ca262 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -2,13 +2,12 @@ # # This module manages rsync # -class rsync( +class rsync ( $package_ensure = 'installed', $manage_package = true, $puts = {}, $gets = {}, ) { - if $manage_package { package { 'rsync': ensure => $package_ensure, diff --git a/manifests/put.pp b/manifests/put.pp index bede4c7..53038d0 100644 --- a/manifests/put.pp +++ b/manifests/put.pp @@ -38,7 +38,6 @@ $timeout = '900', $options = '-a' ) { - if $keyfile { $mykeyfile = $keyfile } else { @@ -92,7 +91,7 @@ exec { "rsync ${name}": command => "rsync -q ${rsync_options}", - path => [ '/bin', '/usr/bin' ], + path => ['/bin', '/usr/bin'], # perform a dry-run to determine if anything needs to be updated # this ensures that we only actually create a Puppet event if something needs to # be updated diff --git a/manifests/server.pp b/manifests/server.pp index ca43fa7..9496706 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -6,7 +6,7 @@ # class xinetd if use_xinetd is set to true # class rsync # -class rsync::server( +class rsync::server ( Boolean $use_xinetd = true, $address = '0.0.0.0', $motd_file = 'UNSET', @@ -22,7 +22,6 @@ Variant[Boolean, Enum['mask']] $service_enable = true, Boolean $manage_package = $rsync::manage_package, ) inherits rsync { - if $use_xinetd { include xinetd xinetd::service { 'rsync': @@ -33,14 +32,12 @@ require => Package['rsync'], } } else { - # Manage the installation of the rsyncd package? if $manage_package { - # RHEL8 and newer (and their variants) have a separate package for rsyncd daemon. If the $package_name # variable is defined (the variable is defined in the hiera hierarchy), then install the package. if $package_name { - package {$package_name: + package { $package_name: ensure => $rsync::package_ensure, notify => Service[$servicename], }