Skip to content

Commit

Permalink
Merge pull request #335 from choria-io/fix-non-systemd
Browse files Browse the repository at this point in the history
(#334) Fix catalog when systemd is not available
  • Loading branch information
smortex authored Feb 13, 2024
2 parents 7a5f030 + f55b7a5 commit 49c4508
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 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 $refresh_type == "systemd" {
if $facts["systemd"] == "systemd" and $refresh_type == "systemd" {
$cron_ensure = "absent"
$systemd_ensure = "present"
$systemd_active = true
Expand Down Expand Up @@ -74,19 +74,21 @@
command => "'${rubypath}' '${scriptpath}' -o '${factspath}' ${factspid} &> /dev/null",
minute => $cron_minutes
}
systemd::timer { "mcollective-facts-refresh.timer":
ensure => $systemd_ensure,
active => $systemd_active,
enable => $systemd_enable,
timer_content => epp("mcollective/refresh_facts.timer.epp", {
if $facts["systemd"] == "systemd" {
systemd::timer { "mcollective-facts-refresh.timer":
ensure => $systemd_ensure,
active => $systemd_active,
enable => $systemd_enable,
timer_content => epp("mcollective/refresh_facts.timer.epp", {
"oncalendar" => $timer_on_calendar,
}),
service_content => epp("mcollective/refresh_facts.service.epp", {
}),
service_content => epp("mcollective/refresh_facts.service.epp", {
"rubypath" => $rubypath,
"scriptpath" => $scriptpath,
"factspath" => $factspath,
"pidfile" => $pidfile,
}),
}),
}
}
}
}

0 comments on commit 49c4508

Please sign in to comment.