Can you please provide an example or reference??

On Friday, October 28, 2016 at 1:16:19 PM UTC-7, Alexander H. Laughlin 
wrote:
>
> If you store the password in a vaulted file I believe you can use su as 
> the become method and accomplish this result.
>
> On Friday, October 28, 2016 at 12:45:24 PM UTC-7, Nitin Mathur wrote:
>>
>> Hi,
>>
>> I am trying to figure out, if the below scenario is possible and if so, 
>> how I can achieve it.
>>
>> My target machine and ansible host is the same machine. There are 2 
>> users, user-1(non-sudo privilege), user-2 (sudo privilege). Both user-1 and 
>> user-2 have passwords. I am logged in to my Ansible host as a 
>> user-1(non-sudo privilege) and execute an ansible script. I need to 
>>  execute this ansible script with sudo privileges meaning as user-2(with 
>> sudo privilege). Also the password entry should be non-interactive. Is 
>> there a way to do this using group_vars or any other way? 
>>
>> Thanks in advance.
>>
>

-- 
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/3332b97c-9e0e-4627-bc1c-edfeed81306a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to