Le lundi 23 mai 2016 10:32:22 UTC+2, fanvalt a écrit :
>
> Thank you but when I run the playbook with a debug module to dispay the 
> rep_user variable, I am expecting the /home/fval value but I display the 
> whole instruction:
>
> in my main.yml tasks:
> - debug: msg="{{ rep_user }}"
>
>
> TASK [openhr : debug] 
> **********************************************************
> ok: [localhost] => {
>     "msg": "{{ (ansible_user == fval)|ternary('/home/' + ansible_user, 
> ansible_user) }} "
> }
>
>
> Le jeudi 19 mai 2016 19:01:02 UTC+2, Brian Coca a écrit :
>>
>> when: ONLY applies to tasks, for vars use ternary filter.
>>
>> rep_user: "{{ (ansible_user == fval)|ternary('/home/' + ansible_user, 
>> ansible_user) }}"
>>
>>
>> ----------
>> 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 [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/07bdac2e-53a8-4341-976b-187a9c70452a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to