diff options
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/htpasswd.pp | 12 | ||||
-rw-r--r-- | manifests/init.pp | 8 |
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 + } + } } |