Hello All,
I would like ask about privileges escalation by sudo.
I need run command on *RemoteMachine*. *User: someone* and *Command:
/usr/local/blah.sh *for example
suoders file:
someone RemoteMachine =(root)*/usr/local/blah.sh*
Unfortunately I can't give permission to switch root, and *I can't give*
NOPASSWD phrase in sudoers.
I tried by:
shell: /usr/local/blah.sh
*become: yes*
*become_method: sudo*
But it is failed because ansible trying switch to user before run
command.
I tried also:
shell: "*sudo* /usr/local/blah.sh"
But this one hanging ansible, because he is waiting for sudo password.
Is there any possibility to just run command with sudo and provide
password automatically ?
I will be very happy for help.
Than you Ansible community,
Regards Dawid D.
--
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/f1b8aeb5-0d3a-45d1-b7c2-97954e8120df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.