From 276f68983715a9de5e571b000d1d7535e1358891 Mon Sep 17 00:00:00 2001 From: varac Date: Mon, 15 Jul 2013 08:55:36 +0200 Subject: added omdadmin htpasswd parameter --- manifests/htpasswd.pp | 12 ++++++++++++ manifests/init.pp | 8 +++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 manifests/htpasswd.pp 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 + } + } } -- cgit v1.2.3