Hi Satish,
The {% raw %} {% endraw %} tags are used here in Kayobe so that this
config is passed down to Kolla-Ansible without being templated by
Kayobe.
As you are just using Kolla-Ansible, you can drop the raw/endraw. KA
should then template out the for-loop correctly.
Cheers,
Matt
On Thu, 9 Nov 2023 at 04:10, Satish Patel <satish.txt@gmail.com> wrote:
>
> Folks,
>
> I am following this guide to deploy sriov compute with kolla-ansible (I am not using kayobe) - https://www.stackhpc.com/sriov-kayobe.html
>
> In the above doc last section neutron sriov agent, I am using the same code but those variables are not reflecting. It just prints everything as it is.
>
> # cat /etc/kolla/host_vars/os1-bos-sriov-comp-001.yml
> neutron_sriov_physnet_mappings:
> physnet1: eno49
>
>
> # cat /etc/kayobe/kolla/config/neutron/sriov_agent.ini
> {% raw %}
> [sriov_nic]
> physical_device_mappings = {% for dev, physnet in sriov_physnet_mappings.items() %}{{ (loop.index0 > 0)|ternary(',','') }}{{ physnet }}:{{ dev }}{% endfor %}
> exclude_devices =
> {% endraw %}
>
> After running deploy it just prints the entire file as its in sriov_agent.ini file instead of proper values of variable. Does kolla-ansible support the above code?
>
>