diff --git a/playbooks/roles/zuul-web/files/log-combined-cache.conf b/playbooks/roles/zuul-web/files/log-combined-cache.conf new file mode 100644 index 0000000000..4168842cad --- /dev/null +++ b/playbooks/roles/zuul-web/files/log-combined-cache.conf @@ -0,0 +1,2 @@ +LogFormat "%h %l %u [%{%F %T}t.%{msec_frac}t] \"%r\" %>s %b \"%{cache-status}e\" \"%{Referer}i\" \"%{User-agent}i\"" combined-cache + diff --git a/playbooks/roles/zuul-web/tasks/main.yaml b/playbooks/roles/zuul-web/tasks/main.yaml index a1b57de660..4c3a714807 100644 --- a/playbooks/roles/zuul-web/tasks/main.yaml +++ b/playbooks/roles/zuul-web/tasks/main.yaml @@ -29,6 +29,16 @@ - 50-zuul.openstack.org.conf - 50-zuul.openstack.org-http.conf +- name: Copy common log configuration + copy: + src: log-combined-cache.conf + dest: /etc/apache2/conf-available + register: _log_combined_cache + +- name: Enable combined cache log config + command: a2enconf log-combined-cache + when: _log_combined_cache.changed + - name: Copy apache config template: src: zuul.vhost.j2 diff --git a/playbooks/roles/zuul-web/templates/openstack.vhost.j2 b/playbooks/roles/zuul-web/templates/openstack.vhost.j2 index 0e99a5aacf..00545d400e 100644 --- a/playbooks/roles/zuul-web/templates/openstack.vhost.j2 +++ b/playbooks/roles/zuul-web/templates/openstack.vhost.j2 @@ -1,7 +1,3 @@ -{% raw %} -LogFormat "%h %l %u [%{%F %T}t.%{msec_frac}t] \"%r\" %>s %b %{cache-status}e \"%{Referer}i\" \"%{User-agent}i\"" combined-cache -{% endraw %} - ServerName zuul.openstack.org ServerAdmin webmaster@openstack.org diff --git a/playbooks/roles/zuul-web/templates/zuul.vhost.j2 b/playbooks/roles/zuul-web/templates/zuul.vhost.j2 index 8f45aaf746..17a486d6b6 100644 --- a/playbooks/roles/zuul-web/templates/zuul.vhost.j2 +++ b/playbooks/roles/zuul-web/templates/zuul.vhost.j2 @@ -1,7 +1,3 @@ -{% raw %} -LogFormat "%h %l %u [%{%F %T}t.%{msec_frac}t] \"%r\" %>s %b %{cache-status}e \"%{Referer}i\" \"%{User-agent}i\"" combined-cache -{% endraw %} - ServerName zuul.opendev.org ServerAdmin webmaster@openstack.org