From fa2663a390ac68bdeefeb9884cb12d06a05bad85 Mon Sep 17 00:00:00 2001 From: Michele Costa Date: Fri, 27 Oct 2023 10:48:14 +0100 Subject: [PATCH] Fix issue with bonding where nmstate has change the field --- roles/process_nmstate/templates/nmstate.yml.j2 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/roles/process_nmstate/templates/nmstate.yml.j2 b/roles/process_nmstate/templates/nmstate.yml.j2 index 64f228e8..12d1096a 100644 --- a/roles/process_nmstate/templates/nmstate.yml.j2 +++ b/roles/process_nmstate/templates/nmstate.yml.j2 @@ -36,9 +36,11 @@ interfaces: link-aggregation: mode: {{ interface.link_aggregation.mode | default('active-backup') }} options: {{ interface.link_aggregation.options | default([]) | to_json }} - slaves: - {% for slave in interface.link_aggregation.slaves %} - - {{ slave }} + port: + {% set old_ports = ((interface.link_aggregation.slaves | default([])) | list) %} + {% set ports = ((interface.link_aggregation.ports | default([])) | list) + old_ports %} + {% for port in ports %} + - {{ port }} {% endfor %} {% endif %} {% if (interface.type | default('ethernet')) == 'vlan' %}