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



-- 
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/63015f79-26d2-4074-bceb-fe21fa5ab5da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to