summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2013-07-15 08:55:36 +0200
committervarac <varacanero@zeromail.org>2013-07-15 08:55:36 +0200
commit276f68983715a9de5e571b000d1d7535e1358891 (patch)
tree0fbaebacc28044e6492fd1e1a00ae4b002155b2f
parent366439345bcc7c87a7b1ba1e4b371a4ea2888d59 (diff)
added omdadmin htpasswd parameter
-rw-r--r--manifests/htpasswd.pp12
-rw-r--r--manifests/init.pp8
2 files changed, 19 insertions, 1 deletions
diff --git a/manifests/htpasswd.pp b/manifests/htpasswd.pp
new file mode 100644
index 0000000..2bd24cc
--- /dev/null
+++ b/manifests/htpasswd.pp
@@ -0,0 +1,12 @@
+class check_mk::htpasswd (
+ $password,
+ $username = 'omdadmin',
+ $path = '/opt/omd/sites/monitoring/etc/htpasswd' ) {
+
+ apache::htpasswd_user { $username:
+ ensure => present,
+ username => $username,
+ password => $password,
+ path => $path
+ }
+}
diff --git a/manifests/init.pp b/manifests/init.pp
index 75698f9..16c8dce 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -6,7 +6,8 @@ class check_mk (
$workspace = '/root/check_mk',
$omd_service_name = 'omd',
$http_service_name = 'httpd',
- $xinitd_service_name = 'xinetd' ) {
+ $xinitd_service_name = 'xinetd',
+ $omdadmin_htpasswd = undef ) {
class { 'check_mk::install':
filestore => $filestore,
@@ -22,4 +23,9 @@ class check_mk (
class { 'check_mk::service':
require => Class['check_mk::config'],
}
+ if $omdadmin_htpasswd {
+ class { 'check_mk::htpasswd':
+ password => $omdadmin_htpasswd
+ }
+ }
}