diff --git a/tasks/horizon_apache.yml b/tasks/horizon_apache.yml index a8045464..b0dc41b7 100644 --- a/tasks/horizon_apache.yml +++ b/tasks/horizon_apache.yml @@ -13,6 +13,13 @@ # See the License for the specific language governing permissions and # 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 # TODO: Replace using apache2_module when fixed in Ansible release - name: Enable apache2 modules diff --git a/vars/debian.yml b/vars/debian.yml index ba1fa60e..232e0433 100644 --- a/vars/debian.yml +++ b/vars/debian.yml @@ -31,6 +31,9 @@ horizon_distro_packages: - gettext 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_site_available: "/etc/apache2/sites-available/openstack-dashboard.conf" diff --git a/vars/redhat-7.yml b/vars/redhat-7.yml index 2a36846e..9991dff3 100644 --- a/vars/redhat-7.yml +++ b/vars/redhat-7.yml @@ -31,6 +31,9 @@ horizon_distro_packages: - which 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_configs: