https://docs.ansible.com/ansible/latest/user_guide/become.html
Br, Md Asiful Haque ________________________________ From: Asiful Haque <kh3lag...@gmail.com> Sent: Saturday, June 13, 2020 8:03:51 AM To: ansible-project@googlegroups.com <ansible-project@googlegroups.com> Subject: Re: [ansible-project] user change Here is the documentation for switching user or privilege escalation Br, Md Asiful Haque ________________________________ From: Asiful Haque <kh3lag...@gmail.com> Sent: Saturday, June 13, 2020 7:54:48 AM To: ansible-project@googlegroups.com <ansible-project@googlegroups.com> Subject: Re: [ansible-project] user change You can use become: yes become_user: your user become_method: sudo/su (default sudo) Br, Md Asiful Haque ________________________________ From: ansible-project@googlegroups.com <ansible-project@googlegroups.com> on behalf of Rajeeb sahoo <rajeeb.sa...@scienaptic.com> Sent: Saturday, June 13, 2020 3:20:57 AM To: Ansible Project <ansible-project@googlegroups.com> Subject: [ansible-project] user change user change form root to new_user at the time of playbook running like a user created and one service will run under root and 2 nd service will run as new_user -- 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 ansible-project+unsubscr...@googlegroups.com<mailto:ansible-project+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/26fff221-0e73-4dc1-b198-5933569ef2e8o%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/26fff221-0e73-4dc1-b198-5933569ef2e8o%40googlegroups.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 ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/DB7PR02MB4156F77DB8293AE65B768A07A29E0%40DB7PR02MB4156.eurprd02.prod.outlook.com.