summaryrefslogtreecommitdiff
path: root/puppet/modules
diff options
context:
space:
mode:
Diffstat (limited to 'puppet/modules')
-rw-r--r--puppet/modules/site_check_mk/manifests/agent/logwatch.pp6
-rw-r--r--puppet/modules/site_check_mk/manifests/agent/mrpe.pp3
-rw-r--r--puppet/modules/site_check_mk/manifests/server.pp19
3 files changed, 19 insertions, 9 deletions
diff --git a/puppet/modules/site_check_mk/manifests/agent/logwatch.pp b/puppet/modules/site_check_mk/manifests/agent/logwatch.pp
index 38514af2..4c249e6f 100644
--- a/puppet/modules/site_check_mk/manifests/agent/logwatch.pp
+++ b/puppet/modules/site_check_mk/manifests/agent/logwatch.pp
@@ -4,8 +4,9 @@ class site_check_mk::agent::logwatch {
# see https://leap.se/code/issues/5135
file { '/usr/lib/check_mk_agent/plugins/mk_logwatch':
- source => 'puppet:///modules/site_check_mk/agent/plugins/mk_logwatch.1.2.4',
- mode => '0755'
+ source => 'puppet:///modules/site_check_mk/agent/plugins/mk_logwatch.1.2.4',
+ mode => '0755',
+ require => Package['check-mk-agent']
}
# only config files that watch a distinct logfile should go in logwatch.d/
@@ -13,6 +14,7 @@ class site_check_mk::agent::logwatch {
ensure => directory,
recurse => true,
purge => true,
+ require => Package['check-mk-server']
}
# service that share a common logfile (i.e. /var/log/syslog) need to get
diff --git a/puppet/modules/site_check_mk/manifests/agent/mrpe.pp b/puppet/modules/site_check_mk/manifests/agent/mrpe.pp
index 37df7f74..7222e4e1 100644
--- a/puppet/modules/site_check_mk/manifests/agent/mrpe.pp
+++ b/puppet/modules/site_check_mk/manifests/agent/mrpe.pp
@@ -8,7 +8,8 @@ class site_check_mk::agent::mrpe {
}
file { '/etc/check_mk/mrpe.cfg':
- ensure => present
+ ensure => present,
+ require => Package['check-mk-server']
} ->
file_line { 'Apt':
line => 'APT /usr/lib/nagios/plugins/check_apt',
diff --git a/puppet/modules/site_check_mk/manifests/server.pp b/puppet/modules/site_check_mk/manifests/server.pp
index 0c98cd5a..d1bc5930 100644
--- a/puppet/modules/site_check_mk/manifests/server.pp
+++ b/puppet/modules/site_check_mk/manifests/server.pp
@@ -25,25 +25,32 @@ class site_check_mk::server {
require => Package['check-mk-server']
}
- Exec['check_mk-reload'] -> Service['nagios']
+ Exec['check_mk-reload'] ->
+ Exec['check_mk-refresh-inventory-daily'] ->
+ Service['nagios']
file {
'/etc/check_mk/conf.d/use_ssh.mk':
content => template('site_check_mk/use_ssh.mk'),
- notify => Exec['check_mk-refresh'];
+ notify => Exec['check_mk-refresh'],
+ require => Package['check-mk-server'];
'/etc/check_mk/all_hosts_static':
content => $all_hosts,
- notify => Exec['check_mk-refresh'];
+ notify => Exec['check_mk-refresh'],
+ require => Package['check-mk-server'];
'/etc/check_mk/.ssh':
- ensure => directory;
+ ensure => directory,
+ require => Package['check-mk-server'];
'/etc/check_mk/.ssh/id_rsa':
content => $seckey,
owner => 'nagios',
- mode => '0600';
+ mode => '0600',
+ require => Package['check-mk-server'];
'/etc/check_mk/.ssh/id_rsa.pub':
content => "${type} ${pubkey} monitor",
owner => 'nagios',
- mode => '0644';
+ mode => '0644',
+ require => Package['check-mk-server'];
# check_icmp must be suid root or called by sudo
# see https://leap.se/code/issues/5171
'/usr/lib/nagios/plugins/check_icmp':