From bf585ef675bbcdcb5773b719a7291b9b2cef36b5 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Sat, 21 Nov 2020 20:53:50 -0800 Subject: [PATCH] testcase_stats: install Apache config for indexing testcase_stats relies on the server to do directory indexing, it doesn't provide its own index files. We need to configure Apache to do directory indexing for the openQA public dir, and disable reverse proxying for it (apparently reverse proxying takes precedence over index generation). Signed-off-by: Adam Williamson --- .../files/fedora_nightlies.conf.httpd | 7 +++++++ roles/testcase_stats/tasks/main.yml | 15 ++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 roles/testcase_stats/files/fedora_nightlies.conf.httpd diff --git a/roles/testcase_stats/files/fedora_nightlies.conf.httpd b/roles/testcase_stats/files/fedora_nightlies.conf.httpd new file mode 100644 index 0000000000..dcc9a86e67 --- /dev/null +++ b/roles/testcase_stats/files/fedora_nightlies.conf.httpd @@ -0,0 +1,7 @@ + + AllowOverride None + Require all granted + Options +Indexes + + +ProxyPass /testcase_stats ! diff --git a/roles/testcase_stats/tasks/main.yml b/roles/testcase_stats/tasks/main.yml index 3f483c5720..7cd9950f26 100644 --- a/roles/testcase_stats/tasks/main.yml +++ b/roles/testcase_stats/tasks/main.yml @@ -1,6 +1,12 @@ # This role installs relval (if needed) and deploys a cron drop-in to # run `relval testcase-stats` for the next Fedora release once an hour -# and dump the output to a configured location. +# and dump the output to a configured location. It also drops an httpd +# config snippet to enable directory indexing and override proxying +# for the location on openQA servers (like the one we expect this role +# to be deployed on). It doesn't actually configure the server to serve +# the directory out - we're currently relying on the openQA Apache +# config to do that, if this role gets split out from the openQA server +# we would need to change that. # Required vars # - testcase_stats_output_dir @@ -18,3 +24,10 @@ - name: Deploy the cronjob template: src=testcase_stats.cron dest=/etc/cron.hourly/testcase_stats owner=root group=root mode=0755 + +- name: Set up Apache config + file: src=fedora_nightlies.conf.httpd dest=/etc/httpd/conf.d/01-fedora_nightlies.conf owner=root group=root mode=0644 + notify: + - reload httpd + tags: + - config