hi,
i have a simple template which is driving me nuts, as it throws an bland error. what in blazes does that mean?
the template:
`
{{ ansible_managed }}
driftfile /etc/ntp.drift
tracefile /etc/ntp.trace
{% if inventory_lparname not in groups[‘DMZ_HOST’] %}
server 10.0.0.1
server some_host
{% elif inventory_lparname in groups[‘DMZ_HOST’] %}
server 10.0.0.2
{% endif %}
`
error:
`
MSG:
AnsibleUndefinedVariable: Unable to look up a name or access an attribute in template string ({{ ansible_managed }}
driftfile /etc/ntp.drift
tracefile /etc/ntp.trace
{% if inventory_lparname not in groups[‘DMZ_HOST’] %}
server 10.0.0.1
server some_host
{% elif inventory_lparname in groups[‘DMZ_HOST’] %}
server 10.0.0.2
{% endif %}
).
Make sure your variable name does not contain invalid characters like ‘-’: argument of type ‘StrictUndefined’ is not iterable
`