Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lint errors #154

Merged
merged 1 commit into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions manifests/get.pp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
$logfile = undef,
$onlyif = undef,
) {

if $keyfile {
$mykeyfile = $keyfile
} else {
Expand Down Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions manifests/put.pp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
$timeout = '900',
$options = '-a'
) {

if $keyfile {
$mykeyfile = $keyfile
} else {
Expand Down Expand Up @@ -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
Expand Down
7 changes: 2 additions & 5 deletions manifests/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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':
Expand All @@ -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],
}
Expand Down