I thought about writing to the community and ask...but before doing that I took the playbook and the template and create a simple project with molecule. Then the same issue. no kolla-ansible/kolla involved at all. So must be something else.
On Sun, May 10, 2020 at 1:33 PM Dick Visser <[email protected]> wrote: > This list is about ansible itself, but your issue seems to be highly > specific to the "kolla" framework: > https://docs.openstack.org/project-deploy-guide/kolla-ansible/latest/ > I would start by reaching out to that community for support first as their > users will have much more experience with the mechanics of "kolla". > > > > On Sat, 9 May 2020 at 18:25, Alfredo De Luca <[email protected]> > wrote: > >> 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 <[email protected]> >> 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 [email protected]. >> 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> >> . >> > -- > Sent from a mobile device - please excuse the brevity, spelling and > punctuation. > > -- > 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/CAL8fbwOQNuiTvWOyNeEoDXZ7ug-M14Q0v4%2BUL9CW8s8-T7Fd7w%40mail.gmail.com > <https://groups.google.com/d/msgid/ansible-project/CAL8fbwOQNuiTvWOyNeEoDXZ7ug-M14Q0v4%2BUL9CW8s8-T7Fd7w%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- */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]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAAWpFTHhuakL1wu6hmeVbzaj5OpaTdHTBD6n52Qf7w4vDdhWzA%40mail.gmail.com.
