OK here is the playbook. What is the complete template, the inventory
you use and the command you've used ?
Regards,
Le 09/05/2020 à 18:25, Alfredo De Luca a écrit :
Apologies if it wasn't clear.
So it's a playbook that create an inventory file from a template for
kolla-ansible so it can install Openstack.
here is the playbook
---
- name: TEMPLATES
file:
path: "{{ deploy_env }}/my_envs/openstack/{{ deploy_env }}"
state: directory
mode: 0755
- name: Create inventory file from a template
template:
src: templates/osk_inventory.j2
dest: "{{ deploy_env }}/my_envs/openstack/{{ deploy_env
}}/osk_inventory_{{ deploy_env }}"
owner: root
group: root
On Sat, May 9, 2020 at 3:55 PM Alfredo De Luca
<alfredo.del...@gmail.com <mailto:alfredo.del...@gmail.com>> wrote:
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*/
--
/*/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 ansible-project+unsubscr...@googlegroups.com
<mailto:ansible-project+unsubscr...@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAAWpFTFzh%2B_sJf8vBU%3DKga-M6MwyXOcH8pxVDL-9xn4rmqneig%40mail.gmail.com
<https://groups.google.com/d/msgid/ansible-project/CAAWpFTFzh%2B_sJf8vBU%3DKga-M6MwyXOcH8pxVDL-9xn4rmqneig%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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/d3de9870-4840-caa8-0e9c-bcc8c1fa7071%40lenhof.eu.org.