I have:

- debug: var=_consul_install_agent
- debug: var=consul_use_dnsmasq
- debug: msg="{{_consul_install_agent and consul_use_dnsmasq}}"


The two variables are true and false respectively, but the expression 
evaluates to true? 


TASK: [consul | debug var=_consul_install_agent] 
****************************** 
ok: [10.0.196.112] => {
    "var": {
        "_consul_install_agent": "False"
    }
}


TASK: [consul | debug var=consul_use_dnsmasq] 
********************************* 
ok: [10.0.196.112] => {
    "var": {
        "consul_use_dnsmasq": "True"
    }
}


TASK: [consul | debug msg="{{_consul_install_agent and consul_use_dnsmasq}}"
] *** 
ok: [10.0.196.112] => {
    "msg": "True"
}


But if the expression is 

- debug: msg="{{_consul_install_agent == true and consul_use_dnsmasq == 
true}}"

Then it evals to false.

Is this expected with jinja? Without the 'and' the '== true' seems not 
necessary.

-- 
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/e8cca6bc-2658-4483-80e7-5fa179dfc5aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to