From 7f3f19035fb2c02258586209aa3b1c366d6fa783 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Fri, 26 Nov 2021 12:33:49 -0800 Subject: [PATCH] openQA: test new os-autoinst scratch build on lab This also tears down our swtpm systemd service setup, as os-autoinst should now handle swtpm device setup for us. Signed-off-by: Adam Williamson --- inventory/group_vars/openqa_lab_workers | 2 ++ roles/openqa/worker/tasks/main.yml | 7 ++++++- roles/openqa/worker/tasks/swtpm-teardown.yml | 6 ++++++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 roles/openqa/worker/tasks/swtpm-teardown.yml diff --git a/inventory/group_vars/openqa_lab_workers b/inventory/group_vars/openqa_lab_workers index 2de4f878e1..45e6233b96 100644 --- a/inventory/group_vars/openqa_lab_workers +++ b/inventory/group_vars/openqa_lab_workers @@ -21,6 +21,8 @@ openqa_nfs_worker: true # install openQA and os-autoinst from updates-testing - this is # staging, we live ON THE EDGE (radical guitar riff) openqa_repo: updates-testing +# 2021-11 scratch builds for testing +openqa_scratch: ["79296470"] openqa_secret: "{{ stg_openqa_apisecret }}" openqa_workers: 4 primary_auth_source: ipa diff --git a/roles/openqa/worker/tasks/main.yml b/roles/openqa/worker/tasks/main.yml index a42f5b55c6..a28640843e 100644 --- a/roles/openqa/worker/tasks/main.yml +++ b/roles/openqa/worker/tasks/main.yml @@ -177,7 +177,12 @@ # for now it's fine to just assume the tap host(s) is/are also the # swtpm host(s) - include_tasks: swtpm-setup.yml - when: openqa_tap|bool + when: "openqa_tap|bool and (deployment_type is not defined or deployment_type != 'stg')" + +# teardown swtpm services, since os-autoinst does this for us since +# 7ae93f9f137b8cf7de22f0494a11ead5b7832e46 +- include_tasks: swtpm-teardown.yml + when: "openqa_tap|bool and (deployment_type is defined and deployment_type == 'stg')" - name: openQA client config template: src=client.conf.j2 dest=/etc/openqa/client.conf owner=_openqa-worker group=root mode=0600 diff --git a/roles/openqa/worker/tasks/swtpm-teardown.yml b/roles/openqa/worker/tasks/swtpm-teardown.yml new file mode 100644 index 0000000000..00bf639cdd --- /dev/null +++ b/roles/openqa/worker/tasks/swtpm-teardown.yml @@ -0,0 +1,6 @@ +- name: Stop and disable swtpm services + service: name=openqa-swtpm@{{ item }} enabled=no state=stopped + loop: "{{ range(1, openqa_workers + 1)|list }}" + +- name: Remove openqa-swtpm service file + file: path=/etc/systemd/system/openqa-swtpm@.service state=absent