Ensure the log folder exists
Restarting the apache service under ubuntu read the envvars file. This envvars contains the folder for logrotate. If the folder doesn't exist or hasn't the apache permissions, the restart of the service will fail. We ensure here the folder properly exists, with the right permissions. Change-Id: I041a044ef88aff917eeb3a618c2c08ac9ceb80fe
This commit is contained in:
parent
f30a914f64
commit
bbe5bb7c3c
@ -13,6 +13,13 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
- name: Ensure apache log folder exists
|
||||||
|
file:
|
||||||
|
dest: "{{ horizon_apache_default_log_folder }}"
|
||||||
|
state: directory
|
||||||
|
owner: "{{ horizon_apache_default_log_owner }}"
|
||||||
|
group: "{{ horizon_apache_default_log_grp }}"
|
||||||
|
|
||||||
# Workaround for https://github.com/ansible/ansible-modules-core/issues/5328
|
# Workaround for https://github.com/ansible/ansible-modules-core/issues/5328
|
||||||
# TODO: Replace using apache2_module when fixed in Ansible release
|
# TODO: Replace using apache2_module when fixed in Ansible release
|
||||||
- name: Enable apache2 modules
|
- name: Enable apache2 modules
|
||||||
|
@ -31,6 +31,9 @@ horizon_distro_packages:
|
|||||||
- gettext
|
- gettext
|
||||||
|
|
||||||
horizon_apache_conf: "/etc/apache2/apache2.conf"
|
horizon_apache_conf: "/etc/apache2/apache2.conf"
|
||||||
|
horizon_apache_default_log_folder: "/var/log/apache2"
|
||||||
|
horizon_apache_default_log_owner: "root"
|
||||||
|
horizon_apache_default_log_grp: "adm"
|
||||||
horizon_apache_security_conf: "/etc/apache2/conf-available/security.conf"
|
horizon_apache_security_conf: "/etc/apache2/conf-available/security.conf"
|
||||||
|
|
||||||
horizon_apache_site_available: "/etc/apache2/sites-available/openstack-dashboard.conf"
|
horizon_apache_site_available: "/etc/apache2/sites-available/openstack-dashboard.conf"
|
||||||
|
@ -31,6 +31,9 @@ horizon_distro_packages:
|
|||||||
- which
|
- which
|
||||||
|
|
||||||
horizon_apache_conf: "/etc/httpd/conf/httpd.conf"
|
horizon_apache_conf: "/etc/httpd/conf/httpd.conf"
|
||||||
|
horizon_apache_default_log_folder: "/var/log/httpd"
|
||||||
|
horizon_apache_default_log_owner: "root"
|
||||||
|
horizon_apache_default_log_grp: "root"
|
||||||
horizon_apache_security_conf: "{{ horizon_apache_conf }}"
|
horizon_apache_security_conf: "{{ horizon_apache_conf }}"
|
||||||
|
|
||||||
horizon_apache_configs:
|
horizon_apache_configs:
|
||||||
|
Loading…
Reference in New Issue
Block a user