casting to bool not working

7 views
Skip to first unread message

Javeria Khan

unread,
Sep 29, 2015, 6:02:49 PM9/29/15
to Ansible Project
Hi,

I've got a dict value that is supposed to evaluate a boolean parameter like so:

var1: False
var2: True

my_dict:
  - {a1: "{{ var1|bool }}"}
  - {a2: "{{ var2|bool }}"} 

However the original True/False values always get evaluated as strings eventually, typecasting doesn't seem to be working. I'm on ansible 1.9.3. 

Output from debug

ok: [host1] => (item={'a1': u'False'})

Reply all
Reply to author
Forward
0 new messages