diff --git a/ansible/roles/nclu-switch/templates/nclu-config.j2 b/ansible/roles/nclu-switch/templates/nclu-config.j2 index 8177e8920..96d1bdc06 100644 --- a/ansible/roles/nclu-switch/templates/nclu-config.j2 +++ b/ansible/roles/nclu-switch/templates/nclu-config.j2 @@ -4,10 +4,10 @@ {% endfor %} {% for interface, config in nclu_switch_interface_config.items() %} -{% if config.description is defined %} -add {{ config.type | default("interface") }} {{ interface }} alias {{ config.description }} -{% endif %} {% for line in config.config %} add {{ config.type | default("interface") }} {{ interface }} {{ line }} {% endfor %} +{% if config.description is defined %} +add {{ config.type | default("interface") }} {{ interface }} alias {{ config.description }} +{% endif %} {% endfor %} diff --git a/releasenotes/notes/nclu-order-dc4cb33d633b73a2.yaml b/releasenotes/notes/nclu-order-dc4cb33d633b73a2.yaml new file mode 100644 index 000000000..68c45f34e --- /dev/null +++ b/releasenotes/notes/nclu-order-dc4cb33d633b73a2.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes an issue with nclu-switch command ordering, when description was + applied first to a non-existent (virtual) interface. See `story 2010279 + `__ for details.