I'm not certain but...
According to the documentation when: takes a jinja 2 expression. I don't know the order of precedence in jinja 2, but var1 and var2 is defined could be read as (var1 and var2) is defined or var1 and (var2 is defined) I suspect that you are looking for the second one, but you MIGHT be getting the first. have you considered grouping the relevant parts so that you have (var1) and (var2 is defined) To me, that seems a lot clearer as to the intent. Adam -- 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 ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.