Hello
I have this inventory file:
/etc/ansible/inventory/inventory-file
`
[my-group]
myhost.com project=my group=group
[my-group:vars]
project=my
group=my-group
`
and this is my playbook
`
- hosts: ‘{{ host }}’
gather_facts: yes
roles:
- role: collectd
vars:
group: {{ project }}
project: {{ group }}
`
But for some reason ansible cant read those variables, can i know how i can access this variables ?
`
{% if project == “my” %}
<Node “my_graphite”>
Host “my_host”
{% elif project == “11” or project == “22” %}
<Node “11”>
Host “22”
`
I will be using this variables to create a flexible tempalte file