I did bypass the issue by using a variable that I set previously when
testing to /home/fval
When I will test for real, I will set it to {{ ansible_user }}
Le lundi 23 mai 2016 10:50:55 UTC+2, fanvalt a écrit :
>
>
>
> 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/2528b417-0656-4afe-a7a7-59457c4e4ee4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.