summaryrefslogtreecommitdiff
path: root/manifests/config.pp
diff options
context:
space:
mode:
authorKeith Burdis <keith@burdis.org>2013-02-08 15:57:57 +0000
committerKeith Burdis <keith@burdis.org>2013-02-08 15:57:57 +0000
commit32297aace9a2f8ef1117ea233335b93f8fb0aee2 (patch)
tree2133501aa97fb1b7b22e3998bd564665cfba6fe2 /manifests/config.pp
parentbdb8d71a4cffd2111be32570f1babaaae081881a (diff)
Create the site in the install class to avoid having to specify lots of dependencies. Fixes after testing.
Diffstat (limited to 'manifests/config.pp')
-rw-r--r--manifests/config.pp10
1 files changed, 5 insertions, 5 deletions
diff --git a/manifests/config.pp b/manifests/config.pp
index 2a6f827..29af0e1 100644
--- a/manifests/config.pp
+++ b/manifests/config.pp
@@ -4,10 +4,6 @@ class check_mk::config (
) {
$etc_dir = "/omd/sites/${site}/etc"
$bin_dir = "/omd/sites/${site}/bin"
- exec { 'omd-create-site':
- command => "/usr/bin/omd create ${site}",
- creates => $etc_dir,
- }
file { "${etc_dir}/nagios/local":
ensure => directory,
}
@@ -60,7 +56,8 @@ class check_mk::config (
content => "]\n",
order => 29,
}
- check_mk::hostgroup { keys($host_groups):
+ $groups = keys($host_groups)
+ check_mk::hostgroup { $groups:
dir => "${etc_dir}/nagios/local/hostgroups",
host_groups => $host_groups,
target => "${etc_dir}/check_mk/main.mk",
@@ -76,16 +73,19 @@ class check_mk::config (
# re-read config if it changes
exec { 'check_mk-refresh':
command => "${bin_dir}/check_mk -I",
+ user => $site,
refreshonly => true,
notify => Exec['check_mk-reload'],
}
exec { 'check_mk-reload':
command => "${bin_dir}/check_mk -O",
+ user => $site,
refreshonly => true,
}
# re-read inventory at least daily
exec { 'check_mk-refresh-inventory-daily':
command => "${bin_dir}/cmk -I",
+ user => $site,
schedule => 'daily',
}
}