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 <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2020-11-21 20:53:50 -08:00
parent cda822f926
commit bf585ef675
2 changed files with 21 additions and 1 deletions

View file

@ -0,0 +1,7 @@
<Directory "/usr/share/openqa/public">
AllowOverride None
Require all granted
Options +Indexes
</Directory>
ProxyPass /testcase_stats !

View file

@ -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