thank you. that works. how do i save the users password and the become pass?
like I want to run ansible -a "systemctl status docker" myhosts -i hosts --become On Thu, Feb 10, 2022 at 2:55 PM Brian Coca <[email protected]> wrote: > 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 a topic in the > Google Groups "Ansible Project" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/ansible-project/1gmhKgI8QkI/unsubscribe. > To unsubscribe from this group and all its topics, 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 > <https://groups.google.com/d/msgid/ansible-project/CACVha7dPqG-oRF1Xw-zaHLHCJfHeK2FEgXiaZ4DZrZ1cENetoQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- 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/CALmkhkrmfabv33-GxkUW2McNegWD4iGeJ2YgmxyZmDR2UHK6cg%40mail.gmail.com.
