summaryrefslogtreecommitdiff
path: root/manifests/config.pp
diff options
context:
space:
mode:
authorKeith Burdis <keith@burdis.org>2013-02-07 13:11:20 +0000
committerKeith Burdis <keith@burdis.org>2013-02-07 13:11:20 +0000
commitdaf091c1d249703132b35380e7c973a132aca093 (patch)
tree06f7b31d736b8790c6ffd0306652d4425a42d7c2 /manifests/config.pp
parent6405936dae74ed336f1421a27c7c22abf6d02d9e (diff)
Use exported resources to populate all_hosts array.
Diffstat (limited to 'manifests/config.pp')
-rw-r--r--manifests/config.pp24
1 files changed, 20 insertions, 4 deletions
diff --git a/manifests/config.pp b/manifests/config.pp
index 0e0b740..5b714ec 100644
--- a/manifests/config.pp
+++ b/manifests/config.pp
@@ -11,11 +11,27 @@ class check_mk::config {
path => '/etc/nagios/nagios.cfg',
notify => Class['check_mk::service'],
}
- file { '/etc/check_mk/main.mk':
- ensure => present,
- content => "all_hosts = [ 'lnxmgt-01.sbetenv.ads' ]",
- notify => Exec['check_mk-restart'],
+ concat { '/etc/check_mk/main.mk':
+ owner => 'root',
+ group => 'root',
+ mode => '0644',
+ }
+ concat::fragment { 'all_hosts-header':
+ target => '/etc/check_mk/main.mk',
+ content => "all_hosts = [\n",
+ order => 01,
+ }
+ concat::fragment { 'all_hosts-footer':
+ target => '/etc/check_mk/main.mk',
+ content => "]\n",
+ order => 03,
}
+ Check_mk::Host <<| |>> { notify => Exec['check_mk-restart'] }
+ #file { '/etc/check_mk/main.mk':
+ # ensure => present,
+ # content => "all_hosts = [ 'lnxmgt-01.sbetenv.ads' ]",
+ # notify => Exec['check_mk-restart'],
+ #}
exec { 'check_mk-restart':
command => '/usr/bin/check_mk -O',
refreshonly => true,