hi guys i am getting below error
"AnsibleUndefinedVariable: 'web_servers' is undefined"


this is variables in vars file : vars/main.yml

 web_servers:
  - {hostname: xxxxx1, ip: 192.168.0.1, port: 8080}
  - {hostname: xxxxx2, ip: 192.168.0.2, port: 8080}


this cfg in templates: templates/main.yml

 {% for server in web_servers %}
    server {{ server.hostname }} {{ server.ip }}:{{ server.port }} check
    {% endfor %}

do i need to include default vars/main.yml file in templates/main.yml ?
can any one suggest...!!!

-- 
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/3ec5bbc5-f598-4c54-8be1-25c66bfbc453%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to