diff options
author | Keith Burdis <keith@burdis.org> | 2013-02-07 17:03:57 +0000 |
---|---|---|
committer | Keith Burdis <keith@burdis.org> | 2013-02-07 17:03:57 +0000 |
commit | be3594468ea18211f4b8ea2fcd1f9ab205a4da7a (patch) | |
tree | 04f6505000ab80a918503b7064fd93ea953d5aba /manifests/install.pp | |
parent | 7b9e60d41a09af40da75f55052c655bf69e6ae76 (diff) |
Add a read-only guest user
Diffstat (limited to 'manifests/install.pp')
-rw-r--r-- | manifests/install.pp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/manifests/install.pp b/manifests/install.pp index 95196b5..2762165 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -5,11 +5,23 @@ class check_mk::install ( ) { package { 'nagios': ensure => present, - notify => Exec['set-nagiosadmin-password', 'add-apache-to-nagios-group'], + notify => Exec['set-nagiosadmin-password', 'set-guest-password', 'add-apache-to-nagios-group'], + } + file { '/etc/nagios/passwd': + ensure => present, + owner => 'root', + group => 'apache', + mode => '0640', } exec { 'set-nagiosadmin-password': - command => '/usr/bin/htpasswd -bc /etc/nagios/passwd nagiosadmin letmein', + command => '/usr/bin/htpasswd -b /etc/nagios/passwd nagiosadmin letmein', + refreshonly => true, + require => File['/etc/nagios/passwd'], + } + exec { 'set-guest-password': + command => '/usr/bin/htpasswd -b /etc/nagios/passwd guest guest', refreshonly => true, + require => File['/etc/nagios/passwd'], } exec { 'add-apache-to-nagios-group': command => '/usr/sbin/usermod -a -G nagios apache', |