Skip to content

Commit

Permalink
Don't reinvent the wheel
Browse files Browse the repository at this point in the history
  • Loading branch information
theseal committed Oct 10, 2024
1 parent 5e3b85d commit 20fbdad
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions manifests/naemon_monitor.pp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
Optional[Boolean] $receive_otel = false,
String $otel_retention = '2232h',
) {
include sunet::systemd_reload

$naemon_container = $::facts['dockerhost2'] ? {
'yes' => 'naemon_monitor-naemon-1',
default => 'naemon_monitor_naemon_1',
Expand Down Expand Up @@ -96,11 +98,6 @@
$influx_env = ['INFLUXDB_ADMIN_USER=admin',"INFLUXDB_ADMIN_PASSWORD=${influx_password}", 'INFLUXDB_DB=nagflux']
$nagflux_env = ["INFLUXDB_ADMIN_PASSWORD=${influx_password}"]

exec { "${name}_daemon_reload":
command => '/usr/bin/systemctl daemon-reload',
refreshonly => true,
}

file { '/etc/systemd/system/sunet-naemon_monitor.service.d/':
ensure => directory,
recurse => true,
Expand All @@ -110,7 +107,7 @@
ensure => file,
content => template('sunet/naemon_monitor/service-override.conf.erb'),
require => File['/etc/systemd/system/sunet-naemon_monitor.service.d/'],
notify => Exec["${name}_daemon_reload"],
notify => Class['sunet::systemd_reload'],
}

sunet::docker_compose { 'naemon_monitor':
Expand Down

0 comments on commit 20fbdad

Please sign in to comment.