Skip to content

Commit 7b43ac7

Browse files
committed
playbooks: guestfs: fix import_tasks file path
guestfs main task YAML file import_tasks for intalling dependencies with: file: "{{ role_path }}/tasks/install-deps/main.yml" That file also import_tasks using distro specific tasks. This file path needs to use the path from the role tasks/ path and not from where the file is located. Logs: make bringup ... ansible-playbook -vv \ --inventory localhost, \ playbooks/guestfs.yml \ --extra-vars=@./extra_vars.yaml \ --tags install-deps ansible-playbook [core 2.19.0b2] config file = /scratch/dagomez/linux-kdevops/kdevops/ansible.cfg configured module search path = ['/home/dagomez/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3/dist-packages/ansible ansible collection location = /home/dagomez/.ansible/collections:/usr /share/ansible/collections executable location = /usr/bin/ansible-playbook python version = 3.13.3 (main, Apr 10 2025, 21:38:51) [GCC 14.2.0] (/usr/bin/python3) jinja version = 3.1.6 pyyaml version = 6.0.2 (with libyaml v0.2.5) Using /scratch/dagomez/linux-kdevops/kdevops/ansible.cfg as config file statically imported: /scratch/dagomez/linux-kdevops/kdevops/playbooks/roles/guestfs/tasks/ install-deps/main.yml [ERROR]: Unable to retrieve file contents. Could not find or access '/scratch/dagomez/linux-kdevops/kdevops/playbooks/debian/main.yml' on the Ansible Controller. If you are using a module and expect the file to exist on the remote, see the remote_src option: [Errno 2] No such file or directory: '/scratch/dagomez/linux-kdevops/kdevops/playbooks/debian/main.yml Signed-off-by: Daniel Gomez <[email protected]>
1 parent da2fa04 commit 7b43ac7

File tree

1 file changed

+3
-3
lines changed
  • playbooks/roles/guestfs/tasks/install-deps

1 file changed

+3
-3
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
22
- name: Debian-specific setup
33
ansible.builtin.import_tasks:
4-
file: debian/main.yml
4+
file: "{{ role_path }}/tasks/install-deps/debian/main.yml"
55
when:
66
- ansible_os_family == "Debian"
77

88
- name: SuSE-specific setup
99
ansible.builtin.import_tasks:
10-
file: suse/main.yml
10+
file: "{{ role_path }}/tasks/install-deps/suse/main.yml"
1111
when:
1212
- ansible_os_family == "Suse"
1313

1414
- name: Red Hat-specific setup
1515
ansible.builtin.import_tasks:
16-
file: redhat/main.yml
16+
file: "{{ role_path }}/tasks/install-deps/redhat/main.yml"
1717
when:
1818
- ansible_os_family == "Redhat"

0 commit comments

Comments
 (0)