diff options
author | Micah Anderson <micah@riseup.net> | 2013-04-12 13:23:29 -0400 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2013-04-12 14:37:28 -0400 |
commit | 115691c87bad3f5863f088e73603133b67c9f828 (patch) | |
tree | bbfd7b5c0d0c220ef3e52eb25acd4595a46b85d0 /manifests/defaultphpdirs.pp | |
parent | 2401aae6c4785c1e6a777756bebe70c38b889727 (diff) | |
parent | 5ec141dfbf218dd9b2f2611d788db98f74e65073 (diff) |
Merge remote-tracking branch 'immerda/master'
Fixed apache_no_default_site variable to be a parameter to the apache
class (no_default_site = false)
Conflicts:
files/include.d/Debian/ssl_defaults.inc
manifests/base.pp
manifests/config/file.pp
manifests/vhost.pp
manifests/vhost/php/standard.pp
manifests/vhost/template.pp
templates/vhosts/php/CentOS.erb
templates/vhosts/php/Debian.erb
Diffstat (limited to 'manifests/defaultphpdirs.pp')
-rw-r--r-- | manifests/defaultphpdirs.pp | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/manifests/defaultphpdirs.pp b/manifests/defaultphpdirs.pp index fdbe8a5..5485241 100644 --- a/manifests/defaultphpdirs.pp +++ b/manifests/defaultphpdirs.pp @@ -1,14 +1,31 @@ -# manifests/defaultphpdirs.pp - +# setup some directories for php class apache::defaultphpdirs { - file{'/var/www/upload_tmp_dir': - ensure => directory, + file{ + '/var/www/upload_tmp_dir': + ensure => directory, require => Package['apache'], - owner => root, group => 0, mode => 0755; - } - file{'/var/www/session.save_path': - ensure => directory, + owner => root, + group => 0, + mode => '0755'; + '/var/www/session.save_path': + ensure => directory, require => Package['apache'], - owner => root, group => 0, mode => 0755; + owner => root, + group => 0, + mode => '0755'; + } + + if $::selinux != 'false' { + $seltype_rw = $::lsbmajdistrelease ? { + 5 => 'httpd_sys_script_rw_t', + default => 'httpd_sys_rw_content_t' + } + selinux::fcontext{ + [ '/var/www/upload_tmp_dir/.+(/.*)?', + '/var/www/session.save_path/.+(/.*)?' ]: + require => Package['apache'], + setype => $seltype_rw, + before => File['/var/www/upload_tmp_dir','/var/www/session.save_path']; + } } } |