Open jokjr opened 3 years ago
Another blunder that we could spot with this would be
- name: do something
when: "ansible_distribution == 'Debian' and ansible_distribution_version >= 11"
...
which yields
AnsibleError: Unexpected templating type error occurred on ........ '>=' not supported between instances of 'AnsibleUnsafeText' and 'int'
While full blown type inference may not be feasible, it should be quite doable to catch at least some basic things, like:
Where Ansible will complain with something like:
Basically we can infer that the
selectattr
filter is a generator, and thatlength
will not work on agenerator
, but needs alist
.