- name: Run a command as the userb user command: somecommand become: true become_user: userb
On Friday, November 17, 2017 at 2:17:15 PM UTC-2, Nikos Skalis wrote: > > Could you please advise how > > usera@serverX:~> sudo su - userb > Last login: Fri Nov 17 15:46:48 CET 2017 on pts/1 > -bash-4.2$ > (note that no password requested above) > > translates into ansible ? > > > More specifically, I would like to login to linux server X as `usera` then > become `userb` (with the command above), and then execute all the tasks > defined in the playbook as `userb` > > The following are configuration options in `ansible.cfg`: > > sudo_user = root > #ask_sudo_pass = True > #ask_pass = True > #remote_user = root > #become=True > #become_method=sudo > #become_user=root > #become_ask_pass=False > > I am having trouble understanding the difference between the above > configuration options. > > Niko > -- 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/5df5e1cb-cb3b-43d1-9977-6441e434df75%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
