Skip to content

Commit 0f8bb79

Browse files
danpawlikmichburk
authored andcommitted
[cifmw_setup] Use cifmw_helpers role to read variable files
In the CI job, where the nested Ansible execution was removed, there is an issue to read the variables using include_vars module, because that module is searching the files on the host where the Ansible was executed. It means that if the nested Ansible was dropped, the Ansible bin was called from the Zuul executor, on which the /home/zuul does not exists. Signed-off-by: Daniel Pawlik <dpawlik@redhat.com>
1 parent 0c53ca8 commit 0f8bb79

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

roles/cifmw_setup/tasks/host_virtualization.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
---
22
- name: Load parameters files
3-
ansible.builtin.include_vars:
4-
dir: "{{ cifmw_basedir }}/artifacts/parameters"
3+
vars:
4+
included_dir: "{{ cifmw_basedir }}/artifacts/parameters"
5+
ansible.builtin.include_role:
6+
name: cifmw_helpers
7+
tasks_from: include_dir.yml
58

69
- name: Ensure libvirt is present/configured
710
when:

roles/cifmw_setup/tasks/infra.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
---
22
- name: Load parameters files
3-
ansible.builtin.include_vars:
4-
dir: "{{ cifmw_basedir }}/artifacts/parameters"
3+
vars:
4+
included_dir: "{{ cifmw_basedir }}/artifacts/parameters"
5+
ansible.builtin.include_role:
6+
name: cifmw_helpers
7+
tasks_from: include_dir.yml
58

69
- name: Load Networking Environment Definition
710
vars:

0 commit comments

Comments
 (0)