I get below error for a file module in my ansible playbook. I am trying to create a file in remote server using file module, where i got this error when i run for a long set of inventory, whereas when i tried to reproduce it for only troublesome host it is succeeding. I am unable to reproduce the issue. I did not store file module outcome in register variable in my playbook.
Now, I just want to know what would be the register variable content if “Timeout waiting for privilege escalation prompt” occur, so that i can add conditions to capture this into a report in my playbook.
ACTUAL OUTCOME:
- name: Create files
become: True
file:
path: /path/{{ item }}
state: directory
recurse: yes
with_items:- file1
- file2
Timeout (12s) waiting for privilege escalation prompt
EXPECTED OUTCOME:
File module to succeed