[ansible-project] [WARNING]: when statements should not include jinja2 templating delimiters such as {{ }} or {% %}.

2017-06-29 Thread Josh Smift
ta> task: ta> - include: lvm.yml ta> when: ansible_devices.{{ raw_disk }}.partitions|length == 0 The shortcut a.b.c.d notation doesn't let you distinguish between literals and variables. Try the more Pythonic when: ansible_devices[raw_disk]['partitions']|length == 0 and see if that does

[ansible-project] [WARNING]: when statements should not include jinja2 templating delimiters such as {{ }} or {% %}.

2017-06-29 Thread trg . achilles
Hello, I'm trying to remove jinja delimiter used in when condition. My condition tests whether partition exists on disk drive. I use variable to assign which drive to test vars: raw_disk: 'sdb' task: - include: lvm.yml when: ansible_devices.{{ raw_disk }}.partitions|length == 0 with {{