Closed
Description
In a role called from a playbook we have the following task:
- name: Generate file.txt
template:
src: glogin.sql.j2
dest: "{{ home }}/file.txt"
backup: yes
with_items:
- "{{ databases }}"
become: yes
become_user: "{{ user }}"
Expected result: the file file.txt created in given path.
Actual result:
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: names = os.listdir(path)
fatal: [xxx]: FAILED! =>
msg: Unexpected failure during module execution.
stdout: ''
Without "strategy: mitogen_linear" (with strategy: linear) the task works as expected.
Looks like when using mitogen strategy the var is not set before role is being called from a playbook.