diff options
author | varac <varacanero@zeromail.org> | 2016-05-03 21:18:33 +0200 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2016-05-03 21:43:32 +0200 |
commit | 385402972a3f4566393faaf28bf09cbcc5191ab0 (patch) | |
tree | 0bc0e1cbd65a3260e8353343d0daa5ccb5ec3662 /manifests/config.pp | |
parent | 039ba928a22cdf33632bf447ceb4fac4bbc77b63 (diff) |
use inventory_only_on_changes to always run inventory and nagios reload
By default ($inventory_only_on_changes set to `true`) these two execs
are called only when config files changes:
- Exec['check_mk-refresh'] (which inventorizes checks by calling
`check_mk -II`)
- Exec['check_mk-reload'] (which generates the nagios config and
reloads nagios by calling `check_mk -O`)
By setting this parameter to `false` these execs will be called
on each puppetrun.
Diffstat (limited to 'manifests/config.pp')
-rw-r--r-- | manifests/config.pp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/manifests/config.pp b/manifests/config.pp index a9f99d8..522be19 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -1,11 +1,12 @@ # Deploy check_mk config class check_mk::config ( $site, - $host_groups = undef, - $etc_dir = "/omd/sites/${site}/etc", - $nagios_subdir = 'nagios', - $bin_dir = "/omd/sites/${site}/bin", - $use_storedconfigs = true + $host_groups = undef, + $etc_dir = "/omd/sites/${site}/etc", + $nagios_subdir = 'nagios', + $bin_dir = "/omd/sites/${site}/bin", + $use_storedconfigs = true, + $inventory_only_on_changes = true ) { file { # for local check_mk checks @@ -93,12 +94,12 @@ class check_mk::config ( # re-read config if it changes exec { 'check_mk-refresh': command => "/bin/su -l -c '${bin_dir}/check_mk -II' ${site}", - refreshonly => true, + refreshonly => $inventory_only_on_changes, notify => Exec['check_mk-reload'], } exec { 'check_mk-reload': command => "/bin/su -l -c '${bin_dir}/check_mk -O' ${site}", - refreshonly => true, + refreshonly => $inventory_only_on_changes, creates => '/etc/nagios3/conf.d/check_mk/check_mk_objects.cfg' } # re-read inventory at least daily |