patch dl.fedoraproject.org in openQA test templates

So apparently hosts within infra can't reach dl.fp.o. This is a
problem as we have that host written in as a reliable repository
URL for a couple of openQA tests. infra hosts can reach dl.fp.o
by the name 'dl.phx2.fedoraproject.org', but nothing outside
infra can reach that hostname. So we don't just want to change
it in the openQA test git repo because we want that to work for
external deployments. So, let's just sed it on the fly for
the infra deployment...
This commit is contained in:
Adam Williamson 2015-12-03 16:08:13 -08:00
parent e27f28ef44
commit 9d271749fb

View file

@ -169,8 +169,12 @@
changed_when: "admin.rc == 0"
failed_when: "(admin.rc > 0) and (admin.stderr is not defined or admin.stderr.find('already exists') == -1)"
- name: Patch repo URLs in templates
shell: "cp /var/lib/openqa/share/tests/fedora/templates /tmp && sed -i -e 's,dl.fedoraproject,dl.phx2.fedoraproject,g' /tmp/templates"
changed_when: "1 != 1"
- name: Load tests
shell: "/var/lib/openqa/share/tests/fedora/templates | grep 'added => [1-9]'"
shell: "/tmp/templates | grep 'added => [1-9]'"
register: templates
changed_when: "templates.rc == 0"
failed_when: "1 != 1"