From d35398979cc5315f1d08928370b29e11233d4bd7 Mon Sep 17 00:00:00 2001 From: Martin Necas Date: Mon, 11 Dec 2023 17:12:37 +0100 Subject: [PATCH] CI: Fix ansible-test errors: Change include to include_tasks Signed-off-by: Martin Necas --- .../fragments/733-roles-fix-ansible-test.yml | 3 +++ .../tasks/recover/register_templates.yml | 2 +- .../tasks/recover/register_vms.yml | 2 +- .../roles/datacenter_cleanup/tasks/main.yml | 16 ++++++++-------- 4 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 changelogs/fragments/733-roles-fix-ansible-test.yml diff --git a/changelogs/fragments/733-roles-fix-ansible-test.yml b/changelogs/fragments/733-roles-fix-ansible-test.yml new file mode 100644 index 00000000..1681e599 --- /dev/null +++ b/changelogs/fragments/733-roles-fix-ansible-test.yml @@ -0,0 +1,3 @@ +--- +bugfixes: + - roles - Fix ansible-test errors change include to include_tasks (https://github.com/oVirt/ovirt-ansible-collection/pull/733). diff --git a/roles/disaster_recovery/tasks/recover/register_templates.yml b/roles/disaster_recovery/tasks/recover/register_templates.yml index b1688fa4..5971850a 100644 --- a/roles/disaster_recovery/tasks/recover/register_templates.yml +++ b/roles/disaster_recovery/tasks/recover/register_templates.yml @@ -10,7 +10,7 @@ register: storage_template_info - name: Register unregistered templates - include: register_template.yml + include_tasks: register_template.yml # The main task is already declared to ignore errors so that might be # redundant to put it here ignore_errors: "{{ ignore | default(yes) }}" with_items: "{{ storage_template_info.ovirt_storage_templates }}" diff --git a/roles/disaster_recovery/tasks/recover/register_vms.yml b/roles/disaster_recovery/tasks/recover/register_vms.yml index 9788f603..5e6ec4dc 100644 --- a/roles/disaster_recovery/tasks/recover/register_vms.yml +++ b/roles/disaster_recovery/tasks/recover/register_vms.yml @@ -15,7 +15,7 @@ # TODO: We should filter out VMs which already exist in the setup (diskless VMs) - name: Register VMs - include: register_vm.yml + include_tasks: register_vm.yml with_items: "{{ storage_vm_info.ovirt_storage_vms }}" # We use loop_control so storage.name will not be overridden by the nested loop. loop_control: diff --git a/roles/infra/roles/datacenter_cleanup/tasks/main.yml b/roles/infra/roles/datacenter_cleanup/tasks/main.yml index 972e23f6..89c97314 100644 --- a/roles/infra/roles/datacenter_cleanup/tasks/main.yml +++ b/roles/infra/roles/datacenter_cleanup/tasks/main.yml @@ -1,15 +1,15 @@ --- - name: Remove VMPools - include: vm_pools.yml + include_tasks: vm_pools.yml - name: Remove VMs - include: vms.yml + include_tasks: vms.yml - name: Remove Templates - include: templates.yml + include_tasks: templates.yml - name: Remove Disks - include: disks.yml + include_tasks: disks.yml - name: Find existing Storage Domains in Datacenter ovirt_storage_domain_info: @@ -18,7 +18,7 @@ register: sd_info - name: Remove all Storage Domains except master - include: storages_pre.yml + include_tasks: storages_pre.yml - name: Find existing clusters in Datacenter ovirt_cluster_info: @@ -27,13 +27,13 @@ register: cluster_info - name: Remove Datacenter - include: datacenter.yml + include_tasks: datacenter.yml - name: Remove master Storage Domain - include: storages_last.yml + include_tasks: storages_last.yml - name: Remove Clusters and Hosts - include: cluster_and_hosts.yml + include_tasks: cluster_and_hosts.yml with_items: "{{ cluster_info.ovirt_clusters }}" loop_control: loop_var: cluster_item