On 13.12.2017 12:55, Mike C wrote:
Hi all,
im trying to use a 'complex' expression to evaluate if a task should
run as
root or not.
Here is what i have defined:
```
debian_based_system: ansible_os_family == 'Debian' or ansible_os_family
==
'Linuxmint'
```
You don't say where you define this, but debian_based_system is
literally equal to the string
ansible_os_family == 'Debian' or ansible_os_family == 'Linuxmint'
I thing you are trying to make debian_based_system true or false, to do
this you need to enclose them in expression syntax {{ }}
ansible_os_family == "{{ 'Debian' or ansible_os_family == 'Linuxmint'
}}"
--
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/e70a6378547771e389ad31ba7685ab1b%40olstad.com.
For more options, visit https://groups.google.com/d/optout.