diff options
-rw-r--r-- | manifests/logrotate/centos.pp | 5 | ||||
-rw-r--r-- | manifests/logrotate/centos/vhosts.pp | 2 | ||||
-rw-r--r-- | manifests/sftponly/centos.pp | 10 |
3 files changed, 10 insertions, 7 deletions
diff --git a/manifests/logrotate/centos.pp b/manifests/logrotate/centos.pp index 593f692..4381205 100644 --- a/manifests/logrotate/centos.pp +++ b/manifests/logrotate/centos.pp @@ -1,9 +1,10 @@ +# add vhost folders to logrotation class apache::logrotate::centos { - # add vhost folders to logrotation augeas{'logrotate_httpd': changes => [ 'rm /files/etc/logrotate.d/httpd/rule/file', 'ins file before /files/etc/logrotate.d/httpd/rule/*[1]', 'set /files/etc/logrotate.d/httpd/rule/file[1] /var/log/httpd/*log' ], - onlyif => 'get /files/etc/logrotate.d/httpd/rule/file[1] != "/var/log/httpd/*log"', + onlyif => 'get /files/etc/logrotate.d/httpd/rule/file[1] != "/var/log/httpd/*log"', + require => Package['apache'], } } diff --git a/manifests/logrotate/centos/vhosts.pp b/manifests/logrotate/centos/vhosts.pp index 1cde2f3..b1159a1 100644 --- a/manifests/logrotate/centos/vhosts.pp +++ b/manifests/logrotate/centos/vhosts.pp @@ -1,5 +1,5 @@ +# add vhost folders to logrotation class apache::logrotate::centos::vhosts inherits apache::logrotate::centos { - # add vhost folders to logrotation Augeas['logrotate_httpd']{ changes => [ 'rm /files/etc/logrotate.d/httpd/rule/file', 'ins file before /files/etc/logrotate.d/httpd/rule/*[1]', diff --git a/manifests/sftponly/centos.pp b/manifests/sftponly/centos.pp index 77bb0ca..6817033 100644 --- a/manifests/sftponly/centos.pp +++ b/manifests/sftponly/centos.pp @@ -1,11 +1,13 @@ +# manage sftponly group and apache +# user for access class apache::sftponly::centos { require user::groups::sftponly augeas{"add_apache_to_group_sftponly": context => "/files/etc/group", changes => [ "ins user after sftponly/user[last()]", - "set sftponly/user[last()] apache" ], - onlyif => "match sftponly/*[../user='apache'] size == 0", - require => Package['apache'], - notify => Service['apache'], + "set sftponly/user[last()] apache" ], + onlyif => "match sftponly/*[../user='apache'] size == 0", + require => [ Package['apache'], Group['sftponly'] ], + notify => Service['apache'], } } |