I'm trying to compare two variables in a "when" statement - when x = y do
something.
This code works:
when: unit_number == {{ disk_unit }}
BUT I get a warning:
[WARNING]: conditional statements should not include jinja2 templating
delimiters such as {{ }} or {% %}. Found: unit_number == {{ disk_unit }}
If I remove the {{ }} the statement no longer works. How should I write
the statement so it works and doesn't give the warning? I've tried various
combinations of double and single quotes and round brackets.
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/92770bd7-d206-4a8c-83a8-0c949313557d%40googlegroups.com.