Thank you for the reply. Very helpful. I have been trying to figure this out for over a week but just been reading and re-reading the documentation and books without getting anywhere.
Is the below correct please and would I need to initiate the ansible command as user foo on the local server or can I use the root user. At the moment I use account foo to initiate Ansible using a sudo entry for the Ansible commands. ansible_ssh_user=foo Remote SSH user ansible_sudo_user=bar Remote sudo user foo => bar (Run commands as user bar on remote server) ansible_ssh_user=foo ansible_sudo_user=bar foo => root (Run commands as user root on remote server) ansible_ssh_user=foo ansible_sudo_user=foo On Friday, 16 January 2015 15:49:55 UTC, Brian Coca wrote: > > no, it is for the remote server, but you are there as the user you > loged in as 'foo', ansible_sudo_user is the user you want to become > from the logged in user, so you can run stuff as bar, but then you > want to sudo again (this is the unsupported part) to run commands as > root. > > so ansible supports this: > > foo => bar > or > foo => root > > but not > > foo => bar => root > > -- > Brian Coca > -- 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/c0cc2838-16ea-4241-90f0-6fb3a7188e91%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
