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

allow reloading config instead of restarting to reload it #265

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@
# @param service_hasrestart
# Service has restart command.
#
# @param service_restart
# Restart command for service.
#
# @param snmptrapd_options
# Commandline options passed to snmptrapd via init script.
#
Expand Down Expand Up @@ -328,6 +331,7 @@
Boolean $trap_service_enable = false,
Boolean $trap_service_hasstatus = true,
Boolean $trap_service_hasrestart = true,
String[1] $service_restart = "/bin/systemctl reload $service_name",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
String[1] $service_restart = "/bin/systemctl reload $service_name",
String[1] $service_restart = "/bin/systemctl reload ${service_name}",

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also this will break (at least) FreeBSD support. This parameter should probably be optional, default to undef and set to this value only on systems where it makes sense through Hiera.

Boolean $openmanage_enable = false,
Boolean $master = false,
Optional[Stdlib::Filemode] $agentx_perms = undef,
Expand Down Expand Up @@ -555,6 +559,7 @@
enable => $service_enable_real,
hasstatus => $service_hasstatus,
hasrestart => $service_hasrestart,
restart => $service_restart,
require => File['var-net-snmp'],
subscribe => File['snmpd.conf'],
}
Expand Down