From 1e0ef2bc8844f943469bf8b19712f797d3498e7f Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 24 Nov 2015 09:25:03 -0800 Subject: [PATCH] openqa: check out tools to a different place in dispatcher Both 'server' and 'dispatcher' roles need to check out openqa_ fedora_tools, but only 'dispatcher' needs to install it. To avoid having to register a variable in 'server' too and have the install task check if either variable |changed, just have two separate checkouts, so the dispatcher checkout will always have 'changed' when appropriate. --- roles/openqa/dispatcher/tasks/main.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/roles/openqa/dispatcher/tasks/main.yml b/roles/openqa/dispatcher/tasks/main.yml index 6058f31d31..e752f329b0 100644 --- a/roles/openqa/dispatcher/tasks/main.yml +++ b/roles/openqa/dispatcher/tasks/main.yml @@ -50,10 +50,12 @@ chdir: /root/openQA-python-client when: "gitclient|changed or instclient.rc > 0" +# We check this out to a different place from the 'server' task, because +# otherwise it's hard to make sure we install each time it changes. - name: Check out openqa_fedora_tools git: repo: https://bitbucket.org/rajcze/openqa_fedora_tools - dest: /root/openqa_fedora_tools + dest: /root/openqa_fedora_tools-dispatcher register: gittools - name: Check if openqa_fedora_tools has ever been installed @@ -65,7 +67,7 @@ - name: Install openqa_fedora_tools command: "python setup.py install" args: - chdir: /root/openqa_fedora_tools + chdir: /root/openqa_fedora_tools-dispatcher when: "gittools|changed or not insttools.stat.exists" - name: Reload systemd config to pick up installed units