Read these docs and make sure you understand them: https://docs.ansible.com/ansible/latest/user_guide/connection_details.html
https://docs.ansible.com/ansible/latest/user_guide/become.html On Wed, 8 Jul 2020 at 05:49, Mahesh N <[email protected]> wrote: > Facing the below error while logging as my user (mahesh) and performing > the actions on service user (service). > > ERROR: > fatal: [10.0.0.1]: UNREACHABLE! => {"changed": false, "msg": > "Authentication failure.", "unreachable": true} > > Tried: > - name: deploy elasticsearch > hosts: all > remote_user: mahesh > become: yes > become_user: service > > -- > 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/f7490938-4830-453a-b6be-b4b4e93b0ec0o%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/f7490938-4830-453a-b6be-b4b4e93b0ec0o%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Sent from a mobile device - please excuse the brevity, spelling and punctuation. -- 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/CAL8fbwOSJEt%2BgZJ0ocHw86T9FWRkDNE9SODJ0oEQBnYAN-%2BwuQ%40mail.gmail.com.
