summaryrefslogtreecommitdiff
path: root/manifests/install.pp
diff options
context:
space:
mode:
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],
+ }
}