Hi,

Please give us a small case with all the pieces and how you run it (ansible-playbook )... You speak about an inventory but it is a template, sound strange given like this...

Le 09/05/2020 à 15:55, Alfredo De Luca a écrit :
Hi all.
I have ansible 2.9.7 running on ubuntu. I am just running some test and one is to create an inventory by a template.
All good except when I use the template it says

*fatal: [instance]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'network_interface' is undefined"}
*

Now here is the inventory.j2 snip

<SNIP>
[control]
{{ osk_nodes.split(',')[0] }}

[compute]
{% for node_ip in osk_nodes.split(',') %}
{{node_ip}}
{% endfor %}

[all:vars]
*network_interface=eno1*
<SNIP>

Not sure why it keep saying undefined variable. where I specifically set the network_interface to eno1.

Any ideas/suggestions?
Cheers




--
/*/Alfredo*/

--
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] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAAWpFTH6R_mpCgd%2BW3ubGnPrJGmy12a-gJAhPZ2-WtTtZSHuGA%40mail.gmail.com <https://groups.google.com/d/msgid/ansible-project/CAAWpFTH6R_mpCgd%2BW3ubGnPrJGmy12a-gJAhPZ2-WtTtZSHuGA%40mail.gmail.com?utm_medium=email&utm_source=footer>.

--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/8fe9eb28-2074-e5a9-44df-64a25fb6ffe8%40lenhof.eu.org.

Reply via email to