As suggested in https://github.com/ansible/ansible/issues/7742
How can you make ansible prompt for the sudo password automatically without specifying --ask-sudo-pass
?
you can use vars_prompt and prompt into ansible_become_pass to solve this! (ansible_sudo_pass
for older ansible versions)
vars_prompt:
- name: "ansible_become_pass"
prompt: "Sudo password"
private: yes
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With