You can just add *become: yes* in your playbook so you don't have to define 
it when running the command.

On Friday, June 3, 2016 at 12:42:53 PM UTC-4, Howard Lee wrote:
>
> Yes, --ask-become-pass helped. Removing '--become-user admin' as it is 
> redundant. The whole command now is:
>
> ansible-playbook -i hosts site.yml --user admin --ask-pass --become 
> --ask-become-pass
>
> This is telling Ansible to ssh using 'admin', and uses 'admin' sudo 
> priviledge to play tasks. It works great.
>
> Thanks.
>
> On Thursday, June 2, 2016 at 12:51:02 PM UTC-7, Kai Stian Olstad wrote:
>>
>> On 02. juni 2016 19:15, Brian Coca wrote: 
>> > try this: 
>> > ansible-playbook -i hosts site.yml --user admin --ask-pass --become 
>>
>> You also need to add --ask-become-pass 
>>
>> -- 
>> Kai Stian Olstad 
>>
>

-- 
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/347f4640-120c-4d33-aff0-75fe0b1b49b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to