From 9d271749fb66a56eed20aec5a7f5cb50b157e7ba Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 3 Dec 2015 16:08:13 -0800 Subject: [PATCH] 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... --- roles/openqa/server/tasks/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/openqa/server/tasks/main.yml b/roles/openqa/server/tasks/main.yml index 674e43ece9..81420fd3e4 100644 --- a/roles/openqa/server/tasks/main.yml +++ b/roles/openqa/server/tasks/main.yml @@ -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"