Fix problem with resolving template lookups
Summary
When rundeck_projects
variable contains "lookup('template', '...') and this variable is passed to
loopthere is a problem with finding this templates. There is (probably) some bug when using loop and
ansible_search_path` list changes and there is missing path to playbook root templates.
Steps to reproduce
- debug:
msg: "{{ ansible_search_path }}"
- debug:
msg: "{{ item }}"
loop:
- "{{ ansible_search_path }}"
Expected behavior
Content of ansible_search_path
should be the same.
Actual behavior
Something like TemplateNotFound
error is thrown.
Possible fixes
Do not pass lookup to loops.