Developer

 View Only
  • 1.  AOSCX Ansible error

    Posted Apr 02, 2022 03:37 PM
    Has anyone come across this error when using the aoscx role ?

    The tasks all work until 
    Configure Interface 1/1/3 - vlan trunk allowed 30

    " \"/tmp/ansible_aoscx_l2_interface_payload_qP6lpT/ansible_aoscx_l2_interface_payload.zip/ansible/modules/aoscx_l2_interface.py\", line 519, in <module>\n File \"/tmp/ansible_aoscx_l2_interface_payload_qP6lpT/ansible_aoscx_l2_interface_payload.zip/ansible/modules/aoscx_l2_interface.py\", line 407, in main\nKeyError: 'admin_state'\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1

    Here's the playbook:
    - hosts: all
    roles:
    - role: arubanetworks.aoscx_role
    gather_facts: False
    vars:
    ansible_connection: httpapi
    students_vlan:
    id: 30
    name: STUDENTS_VLAN
    ipv4: ['10.0.30.1/24']
    interface: 1/1/2
    staff_vlan:
    id: 40
    name: STAFF_VLAN

    tasks:
    - name: Create VLAN 30
    aoscx_vlan:
    vlan_id: "{{students_vlan.id}}"
    name: "{{students_vlan.name}}"

    - name: Create VLAN 40
    aoscx_vlan:
    vlan_id: "{{students_vlan.id}}"
    name: "{{students_vlan.name}}"

    - name: Configure IP VLAN 30
    aoscx_vlan_interface:
    vlan_id: "{{students_vlan.id}}"
    ipv4: "{{students_vlan.ipv4}}"

    - name: Configure Interface 1/1/3 - vlan trunk allowed 30
    aoscx_l2_interface:
    interface: 1/1/3
    state: update
    vlan_mode: trunk
    vlan_trunks: [30,40]
    native_vlan_id: 30

    ------------------------------
    Jorge Garcia
    ------------------------------


  • 2.  RE: AOSCX Ansible error

    Posted Apr 04, 2022 06:47 AM
    There is a typo on your playbook (create vlan 40 i think it is statff and not stude)

    but for your issue, do you have pyaoscx ? (install via requirements.txt)

    ------------------------------
    PowerArubaSW : Powershell Module to use Aruba Switch API for Vlan, VlanPorts, LACP, LLDP...

    PowerArubaCP: Powershell Module to use ClearPass API (create NAD, Guest...)

    PowerArubaCL: Powershell Module to use Aruba Central

    PowerArubaCX: Powershell Module to use ArubaCX API (get interface/vlan/ports info)..

    ACEP / ACMX #107 / ACDX #1281
    ------------------------------



  • 3.  RE: AOSCX Ansible error

    Posted Apr 04, 2022 09:20 AM
    I missed this too, but pay attention to the first bullet point in the Installation section: https://github.com/aruba/aoscx-ansible-role#installation

    ------------------------------
    Don Rhodes
    ------------------------------