Skip to content

Commit

Permalink
Fix issue with bonding where nmstate has change the field
Browse files Browse the repository at this point in the history
  • Loading branch information
nocturnalastro committed Nov 23, 2023
1 parent 41bb421 commit fa2663a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions roles/process_nmstate/templates/nmstate.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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' %}
Expand Down

0 comments on commit fa2663a

Please sign in to comment.