From a2bef634cf9ef2cd8a325a3e735e8ba2f7447fe1 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Fri, 24 Jul 2020 14:11:21 -0700 Subject: [PATCH] openqa/worker: use include_tasks not import_tasks Using `when` with `import_tasks` doesn't actually skip the import entirely, it just imports the tasks and skips them one by one. Which reads oddly. `include_tasks` is properly dynamic so seems better here. Signed-off-by: Adam Williamson --- roles/openqa/worker/tasks/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/openqa/worker/tasks/main.yml b/roles/openqa/worker/tasks/main.yml index 9ca10c6f37..33612fa483 100644 --- a/roles/openqa/worker/tasks/main.yml +++ b/roles/openqa/worker/tasks/main.yml @@ -128,10 +128,10 @@ service: name=rngd enabled=yes state=started when: "openqa_rngd is defined and openqa_rngd" -- import_tasks: nfs-client.yml +- include_tasks: nfs-client.yml when: openqa_hostname is defined and openqa_hostname != "localhost" -- import_tasks: tap-setup.yml +- include_tasks: tap-setup.yml when: openqa_tap is defined and openqa_tap # this is kinda lazy - we could have a separate openqa_swtpm var so we @@ -140,7 +140,7 @@ # conditionals to account for four possibilities rather than two) and # for now it's fine to just assume the tap host(s) is/are also the # swtpm host(s) -- import_tasks: swtpm-setup.yml +- include_tasks: swtpm-setup.yml when: openqa_tap is defined and openqa_tap - name: openQA client config @@ -155,7 +155,7 @@ tags: - config -- import_tasks: createhdds.yml +- include_tasks: createhdds.yml when: "inventory_hostname in groups['openqa_hdds_workers']" - name: Enable and start worker services