Skip to content

Commit 7cda45d

Browse files
committed
Fix including a var file in set_vars.yml.
['{{ role_path }}/vars/main.yml'] in the original code fails with "Could not find or access '{{ role_path }}/vars/main.yml'". The path in the name string was fixed, as well.
1 parent 5f02ccd commit 7cda45d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

roles/rsyslog/tasks/set_vars.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
{{ ansible_facts['distribution_version'] }}.yml"
2020
when: item is file
2121

22-
- name: "Include {{ role_path }}/roles/rsyslog/vars/main.yml"
22+
- name: "Include {{ role_path }}/vars/main.yml"
2323
include_vars: "{{ item }}"
24-
loop: "{{ ['{{ role_path }}/vars/main.yml'] +
25-
lookup('lines',
26-
'/bin/ls -1 {{ role_path }}/vars/*/*/main.yml').split(',') }}"
24+
loop: "{{ lookup('lines',
25+
'/bin/ls -1 {{ role_path }}/vars/main.yml
26+
{{ role_path }}/vars/*/*/main.yml').split(',') }}"
2727
when: __snapshot_gather_vars is defined and
2828
__snapshot_gather_vars | bool

0 commit comments

Comments
 (0)