try this instead:

ansible -a "systemctl status docker" -i hosts -u user --ask-pass -K --become


Adding (--become) makes ansible responsible for executing sudo (default
become method) and passing in a password if needed (-K prompts you ahead of
time for the sudo password)


-- 
----------
Brian Coca

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CACVha7dPqG-oRF1Xw-zaHLHCJfHeK2FEgXiaZ4DZrZ1cENetoQ%40mail.gmail.com.

Reply via email to