# SPDX-License-Identifier: BSD-3-Clause
---
- name: Reconfigure the bond options
  import_role:
    name: linux-system-roles.network
  vars:
    network_connections:
      # Create a bond controller
      - name: "{{ controller_profile }}"
        state: up
        type: bond
        interface_name: "{{ controller_device }}"
        bond:
          mode: active-backup
          arp_interval: 60
          arp_ip_target: 192.0.2.128
          arp_validate: none
          primary: "{{ dhcp_interface1 }}"
        ip:
          route_metric4: 65535
      # add an ethernet to the bond
      - name: "{{ port1_profile }}"
        state: up
        type: ethernet
        interface_name: "{{ dhcp_interface1 }}"
        controller: "{{ controller_profile }}"
      # add a second ethernet to the bond
      - name: "{{ port2_profile }}"
        state: up
        type: ethernet
        interface_name: "{{ dhcp_interface2 }}"
        controller: "{{ controller_profile }}"
- name: Show result
  debug:
    var: __network_connections_result
...
