1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-05-18 15:34:19 +00:00
community.general/lib
Will Thames 23324bdda0 Ensure when warning is checked before expanding (#25092)
The `when` condition templating warning should only happen
if the condition itself contains templating, not if variables
in the condition are themselves composed through templating

Before

```
vars:
  x: hello
  y: "{{ x }}"

tasks:
- debug: msg=hello
  when: y
```

would fire a warning because `y` would get expanded to `{{ x }}`.
This checks whether a warning is required prior to expansion.
2017-05-30 15:48:45 -04:00
..
ansible Ensure when warning is checked before expanding (#25092) 2017-05-30 15:48:45 -04:00