View Only
last person joined: 5 days ago 

Expand all | Collapse all

ansible and LAG interfaces

This thread has been viewed 22 times
  • 1.  ansible and LAG interfaces

    Posted Aug 08, 2023 10:59 AM

    I've encountered strange problem. 

    when I try to touch a LAG interface its members are shut down

    The task is ultra simple:

           - name: Configure lag1
               interface: lag1
               vlan_mode: trunk
               vlan_trunks: ['1','160','400','420']
               native_vlan_id: '1'

    It is executing properly

    tommyd@ansibe:~/ansible/aruba-test$ ansible-playbook  switch-setup-test.yml 

    PLAY [aoscx_sw1] *******************************************************************************************************************************************

    TASK [Configure lag1] *******************************************************************************************************************************************
    ok: [aoscx_sw1]

    PLAY RECAP *******************************************************************************************************************************************
    aoscx_sw1                  : ok=1    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   


    But after execution both lag1 member interfaces are in shutdown state. What I am doing wrong
    The LAG config is also basic

    aoscx_sw1# show run interface 1/1/51-1/1/52
    interface 1/1/51
        lag 1
    interface 1/1/52
        lag 1
    aoscx_sw1# show run interface lag1
    interface lag 1
        no shutdown
        vlan trunk native 1
        vlan trunk allowed 1,160,400,420
        lacp mode active

  • 2.  RE: ansible and LAG interfaces

    Posted Aug 08, 2023 01:07 PM

    Hi @tommyd@tommyd!

    At this time the collection doesn't fully support LAG interfaces - that'll be a part of the upcoming release which I'll announce once it's published. When it comes to "enabling" or "no shutdown" an interface you'll want to use the aoscx_interface module - Here's an example on our CX Ansible Workflows repo:

    Ti Chiapuzio-Wong (they/them)
    HPE Aruba Networking

  • 3.  RE: ansible and LAG interfaces

    Posted Sep 01, 2023 11:16 AM

    We have found that we have had to use the aoscx_command module to interact with trunks. If you want to update a `trunk allowed` or `loop-protect vlan` list you need to know everything that is already there with the `aoscx_l2_interface` module, or for loop-protect is not an option.

    It is not the best solution, but it is what is what I have found to be the way it can be done.