Skip to content
Open
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
1 change: 1 addition & 0 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
group => 0,
mode => '0644',
content => epp('watchdog/watchdog.conf.epp', {
'keep_alive' => $watchdog::keep_alive_enabled,
'period' => $period,
'tickle' => $tickle,
'interfaces' => $watchdog::interfaces,
Expand Down
2 changes: 2 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# @param service_name Name of the service.
# @param interfaces Array of network interfaces to watch, empty by default.
# @param pings Array of network addresess to ping, empty by default.
# @param keep_alive_enabled Whether to enable keep alive functionality
class watchdog (
Boolean $manage_package,
Optional[String] $package_name,
Expand All @@ -22,6 +23,7 @@
String $service_name,
Array[String] $interfaces = [],
Array[Stdlib::IP::Address::NoSubnet] $pings = [],
Boolean $keep_alive_enabled = true,
) {

contain watchdog::install
Expand Down
4 changes: 3 additions & 1 deletion templates/watchdog.conf.epp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<%- | Integer $period, Integer $tickle, Array[String] $interfaces = [], Array[Stdlib::IP::Address::NoSubnet] $pings = [] | -%>
<%- | Boolean $keep_alive = true, Integer $period, Integer $tickle, Array[String] $interfaces = [], Array[Stdlib::IP::Address::NoSubnet] $pings = [] | -%>
# !!! Managed by Puppet !!!
<% if $keep_alive { -%>
watchdog-device = /dev/watchdog
<% } -%>
watchdog-timeout = <%= $period %>
interval = <%= $tickle %>
realtime = yes
Expand Down