addded htpasswd.users

This commit is contained in:
Erik Bergström 2018-05-23 15:34:21 +02:00
parent 67465fe077
commit 041b16f8ef
2 changed files with 36 additions and 18 deletions

View file

@ -561,6 +561,9 @@ class nrpe {
class nagios_monitor {
$nrpe_clients = hiera_array('nrpe_clients',[]);
$allowed_hosts = join($nrpe_clients," ");
$web_admin_pw = safe_hiera('nagios_nagiosadmin_password');
$web_admin_user = 'icingaadmin';
class { 'webserver': }
class { 'nagioscfg':
hostgroups => $::roles,
@ -568,6 +571,21 @@ class nagios_monitor {
}
class {'nagioscfg::slack': domain => 'sunet.slack.com', token => safe_hiera('slack_token','') } ->
class {'nagioscfg::passive': enable_notifications => '1', obsess_over_hosts => '0'}
sunet::misc::htpasswd_user { $web_admin_user :
filename => "/etc/nagios3/htpasswd.users",
password => $web_admin_pw,
group => 'www-data',
}
file {
'/root/MONITOR_WEB_PASSWORD':
content => sprintf("%s\n", $web_admin_pw),
group => 'root',
mode => '0600',
;
}
nagioscfg::slack::channel {'eln': } ->
nagioscfg::contactgroup {'alerts': } ->
nagioscfg::contact {'slack-alerts':

View file

@ -3,22 +3,22 @@ STATUS=UPDATED
-----BEGIN PGP MESSAGE-----
Version: GnuPG v2
hQEMA0scBZPXCtpJAQf+NFbwIDf0F/he4BYgHIYCzngcLlftNCnnWF1vhNS2N3xb
j2cXWPkWMormwrCH3vdHjgDCeyQTQa1mT3AKU96YS3Ki23InHXm2k89E8Nc15pYU
nXIy+kJfm1KEW9JI+b9O2o4W3LxbmrFtsbDNYN33RqMyMHNUBa+Kw6RqgJU0xfV1
49ft1soG8kkw72yWRPyzDuk41ajBilWnBuUtRZgluuaCN0JxMKJjkIeC+d9t/jhN
j9qKasZ7KUG2AmFMNTO+eXnSkiMccR2eC8K4ViESVRRnZVuyPTaM3rV3s2dl2xtU
BF5AY7OkQamKLx3Q7UYFFIepUBxRGBDOIVvLTgIKVNLBNgFf2504D8bOdIQxnvvB
wYUbaRGxpZX4Cqeod1P65OKrvt3rZnlKNoLDu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