version 1.7.2
It was indeed ansible_ssh_user variable. I needed to switch user for one 
task, but sudo would break ssh agent forwarding.
So this is how it's supposed to be? Would be nice if docs said something 
about it...

W dniu piątek, 7 listopada 2014 20:29:59 UTC+1 użytkownik Brian Coca 
napisał:
>
> what version of ansible? I just tested this and play vars override 
> inventory (the one exception is ansible_ vars which are normally used for a 
> particular host's connection info).
>
> On Fri, Nov 7, 2014 at 7:35 AM, Piotr Gosławski <piotr.g...@gmail.com 
> <javascript:>> wrote:
>
>> From 
>> http://docs.ansible.com/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable
>>
>> If multiple variables of the same name are defined in different places, 
>>> they win in a certain order, which is:
>>>
>> * -e variables always win
>> * then comes "most everything else"
>> * then comes variables defined in inventory
>> * then comes facts discovered about a system
>> * then "role defaults", which are the most "defaulty" and lose in priority 
>> to everything.
>>
>> But when I define a variable both in play and in the inventory, the value 
>> from the inventory is used.
>>
>> Bug / docs not up to date / I'm missing something?
>>
>> -- 
>> 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 ansible-proje...@googlegroups.com <javascript:>.
>> To post to this group, send email to ansible...@googlegroups.com 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/18e94848-028e-41d0-a856-2feeeb5f851f%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/ansible-project/18e94848-028e-41d0-a856-2feeeb5f851f%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> 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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/5e451f27-dbcf-4ce2-bf2d-eafa7f768094%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to