From 8d62e08d6102893282e8f0dc3e860c0587cc508e Mon Sep 17 00:00:00 2001 From: slava Date: Wed, 20 Jan 2016 00:45:00 +0300 Subject: [PATCH] Do not inherit File owning permissions for apache module Change-Id: I45fb8e028a5231433e309dc97d213d0d9c36eb25 Closes-bug: #1535663 --- .../puppet/osnailyfacter/manifests/apache.pp | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/deployment/puppet/osnailyfacter/manifests/apache.pp b/deployment/puppet/osnailyfacter/manifests/apache.pp index e7ae2728fd..4e2f6fdb28 100644 --- a/deployment/puppet/osnailyfacter/manifests/apache.pp +++ b/deployment/puppet/osnailyfacter/manifests/apache.pp @@ -49,16 +49,17 @@ class osnailyfacter::apache ( apache::listen { $listen_ports: } - File { - ensure => 'file', - owner => 'root', - group => 'root', - } + # TODO (vvalyavskiy) Currently, it's not possible to specify owning parameters for File resource, + # cause it breaks apache logging process. Optimization can be returned as soon as pull request + # will be merged - https://github.com/puppetlabs/puppetlabs-apache/pull/1340 # we need to override the logrotate file provided by apache to work around # wsgi issues on the restart caused by logrotate. # LP#1491576 and https://github.com/GrahamDumpleton/mod_wsgi/issues/81 file { '/etc/logrotate.d/apache2': + ensure => 'file', + owner => 'root', + group => 'root', mode => '0644', content => template('osnailyfacter/apache2.logrotate.erb'), require => Package['httpd'] @@ -73,12 +74,17 @@ class osnailyfacter::apache ( $apache2_logrotate_delay = $delay[0] * 60 file { '/etc/logrotate.d/httpd-prerotate': - ensure => 'directory', - mode => '0755', + ensure => 'directory', + owner => 'root', + group => 'root', + mode => '0755', } file { '/etc/logrotate.d/httpd-prerotate/apache2': + ensure => 'file', + owner => 'root', + group => 'root', mode => '0755', content => template('osnailyfacter/apache2.prerotate.erb'), } -} +} \ No newline at end of file