Mercurial > repos > other > Puppet
diff modules/website/manifests/init.pp @ 48:5cdc1c96c477 puppet-3.6
Add SELinux support for website content
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 25 Jul 2015 17:10:35 +0100 |
parents | f9876f71f1a3 |
children | 3674aac72674 |
line wrap: on
line diff
--- a/modules/website/manifests/init.pp Sat Jul 25 11:48:42 2015 +0100 +++ b/modules/website/manifests/init.pp Sat Jul 25 17:10:35 2015 +0100 @@ -81,4 +81,12 @@ file { $cert_dir: ensure => directory; } + if $operatingsystem == 'CentOS' and versioncmp($operatingsystemrelease, 7) >= 0 { + exec { 'set_apache_defaults': + command => 'semanage fcontext -a -t httpd_sys_content_t "/srv/sites(/.*)?"', + path => '/bin:/usr/bin/:/sbin:/usr/sbin', + require => Package['policycoreutils-python'], + unless => 'semanage fcontext --list | grep "/srv/sites\\(/\\.\\*\\)\\?"', + } + } }