Hi Jatinder,
have you tried `ansible_become_method=community.general.sudosu` instead
of `ansible_become_method=sudosu`? The later will definitely not work,
since `sudosu` is not that old that it still has a short name.
(Besides that, I haven't used it, so I unfortunately cannot share
working code.)
Cheers,
Felix
On Sat, 5 Jun 2021 06:08:21 -0700 (PDT)
Jatinder Jawanda <
jatinder...@gmail.com> wrote:
> Hey Felix,
>
> I was looking at this documentation and not sure how to use it.
> Is it possible if you can share a working code. I tried this below
> with this plugin but I was not able to make it run.
> *ansible
example.com -i inventory/example -m shell -a "whoami" -e
> "ansible_ssh_pass=test@123" -e "ansible_sudo_pass=test@123" -u
> test_user -b -e "ansible_become_method=sudosu" -e -e
> "ansible_become_exe=sudo su -"*
>
> In sudoers I have following
> *test_user ALL=(root) /bin/su -*
--
Felix Fontein --
fe...@fontein.de --
https://felix.fontein.de/