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 == fvaltat)|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/86f32060-d7af-4846-a7c7-2369f84f5285%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.