On Saturday, 13 October 2018 05.05.17 CEST Dean Schulze wrote: > I'm new to Ansible and working through the Getting Started in the docs. It > shows to use sudo mode just add --sudo flag, but that fails:
Do you mean this one https://docs.ansible.com/ansible/2.7/user_guide/intro_getting_started.html If so, I do recommend reading everything on that page first, because the information you are asking is there just a little scattered around on the page. > ansible tv -m ping (works) > ansible tv -m ping --sudo (fails with sudo: a password is required) > > Shouldn't Ansible prompt me for a password for sudo mode? >From the bottom of this section https://docs.ansible.com/ansible/latest/user_guide/intro_getting_started.html#remote-connection-information "If using sudo features and when sudo requires a password, also supply --ask-become-pass (previously --ask-sudo-pass which has been deprecated)." --sudo is also deprecated you find that information in the example in this section https://docs.ansible.com/ansible/2.7/user_guide/intro_getting_started.html#your-first-commands # With latest version of ansible `sudo` is deprecated so use become # as bruce, sudoing to root" $ ansible all -m ping -u bruce -b The -b is short version of --become that has replaced -s/--sudo, and the example should have used --become instead of -b to make it more clear. Good luck in your quest to learn Ansible it's a great tool. -- Kai Stian Olstad -- 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 post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/4277897.Pk6sro0nrI%40x1. For more options, visit https://groups.google.com/d/optout.
