Skip to content

Commit

Permalink
(choria-io#338) Fix systemd fact usage
Browse files Browse the repository at this point in the history
The systemd fact is a boolean not a string so check if systemd == true.

Fixes choria-io#338
  • Loading branch information
treydock committed Jan 7, 2025
1 parent 45942e0 commit 161e220
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions manifests/facts.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}

if $refresh_interval > 0 and $server {
if $facts["systemd"] == "systemd" and $refresh_type == "systemd" {
if $facts["systemd"] == true and $refresh_type == "systemd" {
$cron_ensure = "absent"
$systemd_ensure = "present"
$systemd_active = true
Expand Down Expand Up @@ -74,7 +74,7 @@
command => "'${rubypath}' '${scriptpath}' -o '${factspath}' ${factspid} &> /dev/null",
minute => $cron_minutes
}
if $facts["systemd"] == "systemd" {
if $facts["systemd"] == true {
systemd::timer { "mcollective-facts-refresh.timer":
ensure => $systemd_ensure,
active => $systemd_active,
Expand Down

0 comments on commit 161e220

Please sign in to comment.