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 {{ raw_disk }} I receive [WARNING]: when statements should not include 
jinja2 templating delimiters such as {{ }} or {% %}.

What should be the correct condition so the variable can be included 
ansible facts

-- 
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/5844c6fe-daf3-43bc-a078-f5888af1da34%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to