summaryrefslogtreecommitdiff
path: root/manifests/install.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/install.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/install.pp')
-rw-r--r--manifests/install.pp11
1 files changed, 9 insertions, 2 deletions
diff --git a/manifests/install.pp b/manifests/install.pp
index ce49c46..7aba697 100644
--- a/manifests/install.pp
+++ b/manifests/install.pp
@@ -1,6 +1,7 @@
class check_mk::install (
$filestore,
$package,
+ $site,
$workspace,
) {
if $filestore {
@@ -15,8 +16,8 @@ class check_mk::install (
require => File[$workspace],
}
if $package =~ /^omd-(.*?)\.(rpm|deb)$/ {
- $type = $1
- package { 'omd':
+ $type = $2
+ package { $package:
ensure => installed,
provider => $type,
source => "${workspace}/${package}",
@@ -29,4 +30,10 @@ class check_mk::install (
ensure => installed,
}
}
+ $etc_dir = "/omd/sites/${site}/etc"
+ exec { 'omd-create-site':
+ command => "/usr/bin/omd create ${site}",
+ creates => $etc_dir,
+ require => Package[$package],
+ }
}