Skip to content

Commit

Permalink
CI: Fix ansible-test errors: Change include to include_tasks
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Necas <[email protected]>
  • Loading branch information
mnecas authored and mwperina committed Dec 12, 2023
1 parent b23df55 commit d353989
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/733-roles-fix-ansible-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
bugfixes:
- roles - Fix ansible-test errors change include to include_tasks (https://github.com/oVirt/ovirt-ansible-collection/pull/733).
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/disaster_recovery/tasks/recover/register_vms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
16 changes: 8 additions & 8 deletions roles/infra/roles/datacenter_cleanup/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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:
Expand All @@ -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

0 comments on commit d353989

Please sign in to comment.