I'm testing on the simulator.
I upgraded to 4.3.1 and it works :-) Will try to create a testenvironment using physical to tst it also.
Original Message:
Sent: Nov 16, 2023 05:01 PM
From: Tiffany.Chiapuzio-Wong
Subject: Ansible aoscx_l3_interface module
Hi @ArneO - yes as @alagoutte mentioned please create an issue on our Github for better tracking - also can you confirm if this is seen on a physical AOS-CX switch or only using the Switch Simulator?
------------------------------
Ti Chiapuzio-Wong (they/them)
HPE Aruba Networking
Original Message:
Sent: Nov 10, 2023 05:38 AM
From: alagoutte
Subject: Ansible aoscx_l3_interface module
Hi Arne,
I try and get the same issue with l3 (physical) interface... but work with l3 (vlan) interface !
May be need to create an issue on aoscx-ansible-collection Github => https://github.com/aruba/aoscx-ansible-collection/
------------------------------
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
Original Message:
Sent: Nov 08, 2023 04:38 AM
From: ArneO
Subject: Ansible aoscx_l3_interface module
Hi,
I'm trying to get the configuration of l3 interfaces in a VRF correct. I'm testing this using the CX simulator Virtual.10.12.1000
My Playbook:
---- name: Testing l3 interface hosts: all gather_facts: false tasks: - name: Delete L3 interface arubanetworks.aoscx.aoscx_l3_interface: interface: "1/1/7" state: delete - name: Configure L3 interface not defuault VRF arubanetworks.aoscx.aoscx_l3_interface: interface: "1/1/7" ipv4: - "10.2.2.0/31" vrf: "KA-VSX" state: create
Output from the run:
(venv) arne@dev:~/code/auto-netops-ansible$ ansible-playbook -i netbox_inv.yml --extra-vars '{"filter_tenant":"reference","filter_platform":"aoscx"}' -l z13-cx3 playbooks/testing/aoscx/testing_l3_interface_static.yml -vvvansible-playbook [core 2.15.4] config file = /home/arne/code/auto-netops-ansible/ansible.cfg configured module search path = ['/home/arne/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/arne/code/auto-netops-ansible/venv/lib/python3.10/site-packages/ansible ansible collection location = /home/arne/code/auto-netops-ansible/collections executable location = /home/arne/code/auto-netops-ansible/venv/bin/ansible-playbook python version = 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] (/home/arne/code/auto-netops-ansible/venv/bin/python3) jinja version = 3.1.2 libyaml = TrueUsing /home/arne/code/auto-netops-ansible/ansible.cfg as config filehost_list declined parsing /home/arne/code/auto-netops-ansible/netbox_inv.yml as it did not pass its verify_file() methodscript declined parsing /home/arne/code/auto-netops-ansible/netbox_inv.yml as it did not pass its verify_file() methodUsing inventory plugin 'ansible_collections.netbox.netbox.plugins.inventory.nb_inventory' to process inventory source '/home/arne/code/auto-netops-ansible/netbox_inv.yml'Fetching: https://netbox.opdal.net/api/statusFetching: https://netbox.opdal.net/api/dcim/devices/?limit=0&tenant=reference&platform=aoscx&has_primary_ip=True&status=active&status=stagedFetching: https://netbox.opdal.net/api/virtualization/virtual-machines/?limit=0&tenant=reference&platform=aoscx&has_primary_ip=True&status=active&status=stagedFetching: https://netbox.opdal.net/api/dcim/sites/?limit=0Fetching: https://netbox.opdal.net/api/dcim/regions/?limit=0Fetching: https://netbox.opdal.net/api/dcim/site-groups/?limit=0Fetching: https://netbox.opdal.net/api/dcim/locations/?limit=0Fetching: https://netbox.opdal.net/api/tenancy/tenants/?limit=0Fetching: https://netbox.opdal.net/api/dcim/device-roles/?limit=0Fetching: https://netbox.opdal.net/api/dcim/platforms/?limit=0Fetching: https://netbox.opdal.net/api/dcim/device-types/?limit=0Fetching: https://netbox.opdal.net/api/dcim/manufacturers/?limit=0Fetching: https://netbox.opdal.net/api/virtualization/clusters/?limit=0Fetching: https://netbox.opdal.net/api/ipam/services/?limit=0Fetching: https://netbox.opdal.net/api/dcim/racks/?limit=0[WARNING]: Invalid characters were found in group names and automatically replaced, use -vvvv to see detailsParsed /home/arne/code/auto-netops-ansible/netbox_inv.yml inventory source with auto pluginSkipping callback 'default', as we already have a stdout callback.Skipping callback 'minimal', as we already have a stdout callback.Skipping callback 'oneline', as we already have a stdout callback.PLAYBOOK: testing_l3_interface_static.yml *************************************************************************************************************************************************************************************************************1 plays in playbooks/testing/aoscx/testing_l3_interface_static.ymlPLAY [Testing l3 interface] ***************************************************************************************************************************************************************************************************************************TASK [Delete L3 interface] ****************************************************************************************************************************************************************************************************************************task path: /home/arne/code/auto-netops-ansible/playbooks/testing/aoscx/testing_l3_interface_static.yml:7<10.2.0.3> ESTABLISH LOCAL CONNECTION FOR USER: arne<10.2.0.3> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/arne/.ansible/tmp/ansible-local-404586kehlmq0g `"&& mkdir "` echo /home/arne/.ansible/tmp/ansible-local-404586kehlmq0g/ansible-tmp-1699434338.656209-404621-51795052994778 `" && echo ansible-tmp-1699434338.656209-404621-51795052994778="` echo /home/arne/.ansible/tmp/ansible-local-404586kehlmq0g/ansible-tmp-1699434338.656209-404621-51795052994778 `" ) && sleep 0'Using module file /home/arne/code/auto-netops-ansible/collections/ansible_collections/arubanetworks/aoscx/plugins/modules/aoscx_l3_interface.py<10.2.0.3> PUT /home/arne/.ansible/tmp/ansible-local-404586kehlmq0g/tmpy37xx8en TO /home/arne/.ansible/tmp/ansible-local-404586kehlmq0g/ansible-tmp-1699434338.656209-404621-51795052994778/AnsiballZ_aoscx_l3_interface.py<10.2.0.3> EXEC /bin/sh -c 'chmod u+x /home/arne/.ansible/tmp/ansible-local-404586kehlmq0g/ansible-tmp-1699434338.656209-404621-51795052994778/ /home/arne/.ansible/tmp/ansible-local-404586kehlmq0g/ansible-tmp-1699434338.656209-404621-51795052994778/AnsiballZ_aoscx_l3_interface.py && sleep 0'<10.2.0.3> EXEC /bin/sh -c '/home/arne/code/auto-netops-ansible/venv/bin/python3 /home/arne/.ansible/tmp/ansible-local-404586kehlmq0g/ansible-tmp-1699434338.656209-404621-51795052994778/AnsiballZ_aoscx_l3_interface.py && sleep 0'<10.2.0.3> EXEC /bin/sh -c 'rm -f -r /home/arne/.ansible/tmp/ansible-local-404586kehlmq0g/ansible-tmp-1699434338.656209-404621-51795052994778/ > /dev/null 2>&1 && sleep 0'changed: [z13-cx3] => { "changed": true, "invocation": { "module_args": { "description": null, "interface": "1/1/7", "interface_qos_rate": null, "interface_qos_schedule_profile": null, "ip_helper_address": null, "ipv4": null, "ipv6": null, "state": "delete", "vrf": null } }}TASK [Configure L3 interface not defuault VRF] ********************************************************************************************************************************************************************************************************task path: /home/arne/code/auto-netops-ansible/playbooks/testing/aoscx/testing_l3_interface_static.yml:12<10.2.0.3> ESTABLISH LOCAL CONNECTION FOR USER: arne<10.2.0.3> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/arne/.ansible/tmp/ansible-local-404586kehlmq0g `"&& mkdir "` echo /home/arne/.ansible/tmp/ansible-local-404586kehlmq0g/ansible-tmp-1699434340.8457866-404663-54111143503104 `" && echo ansible-tmp-1699434340.8457866-404663-54111143503104="` echo /home/arne/.ansible/tmp/ansible-local-404586kehlmq0g/ansible-tmp-1699434340.8457866-404663-54111143503104 `" ) && sleep 0'Using module file /home/arne/code/auto-netops-ansible/collections/ansible_collections/arubanetworks/aoscx/plugins/modules/aoscx_l3_interface.py<10.2.0.3> PUT /home/arne/.ansible/tmp/ansible-local-404586kehlmq0g/tmp0c2c915k TO /home/arne/.ansible/tmp/ansible-local-404586kehlmq0g/ansible-tmp-1699434340.8457866-404663-54111143503104/AnsiballZ_aoscx_l3_interface.py<10.2.0.3> EXEC /bin/sh -c 'chmod u+x /home/arne/.ansible/tmp/ansible-local-404586kehlmq0g/ansible-tmp-1699434340.8457866-404663-54111143503104/ /home/arne/.ansible/tmp/ansible-local-404586kehlmq0g/ansible-tmp-1699434340.8457866-404663-54111143503104/AnsiballZ_aoscx_l3_interface.py && sleep 0'<10.2.0.3> EXEC /bin/sh -c '/home/arne/code/auto-netops-ansible/venv/bin/python3 /home/arne/.ansible/tmp/ansible-local-404586kehlmq0g/ansible-tmp-1699434340.8457866-404663-54111143503104/AnsiballZ_aoscx_l3_interface.py && sleep 0'<10.2.0.3> EXEC /bin/sh -c 'rm -f -r /home/arne/.ansible/tmp/ansible-local-404586kehlmq0g/ansible-tmp-1699434340.8457866-404663-54111143503104/ > /dev/null 2>&1 && sleep 0'changed: [z13-cx3] => { "changed": true, "invocation": { "module_args": { "description": null, "interface": "1/1/7", "interface_qos_rate": null, "interface_qos_schedule_profile": null, "ip_helper_address": null, "ipv4": [ "10.2.2.0/31" ], "ipv6": null, "state": "create", "vrf": "KA-VSX" } }}PLAY RECAP ********************************************************************************************************************************************************************************************************************************************z13-cx3 : ok=2 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
Interface config before the run:
z13-cx3(config)# show running-config interface 1/1/7interface 1/1/7 exit
Interface configuration after:
z13-cx3(config)# show running-config interface 1/1/7interface 1/1/7 ip address 10.2.2.0/31 exit
And the VRF exists:
z13-cx3(config)# show running-config vrfvrf KA-VSX
Verions:
(venv) arne@dev:~/code/auto-netops-ansible$ pip freezeansible==8.6.0ansible-compat==4.1.10ansible-core==2.15.6ansible-lint==6.22.0ansible-pylibssh==1.1.0attrs==23.1.0Babel==2.13.1bcrypt==4.0.1beautifulsoup4==4.12.2black==23.11.0bracex==2.4Brotli==1.1.0certifi==2023.7.22cffi==1.16.0charset-normalizer==3.3.2click==8.1.7colorama==0.4.6cryptography==41.0.5cssselect==1.2.0cssselect2==0.7.0filelock==3.13.1fonttools==4.44.0future==0.18.3ghp-import==2.1.0grpcio==1.59.2html5lib==1.1idna==3.4importlib-metadata==6.8.0Jinja2==3.1.2jsonschema==4.19.2jsonschema-specifications==2023.7.1jxmlease==1.0.3libsass==0.22.0lxml==4.9.3Markdown==3.5.1markdown-it-py==3.0.0markdown2==2.4.10MarkupSafe==2.1.3mdurl==0.1.2mergedeep==1.3.4mkdocs==1.5.3mkdocs-macros-plugin==1.0.5mkdocs-material==9.4.8mkdocs-material-extensions==1.3mkdocs-simple-plugin==3.1.0mkdocs-with-pdf==0.9.3mypy-extensions==1.0.0ncclient==0.6.15netaddr==0.9.0packaging==23.2paginate==0.5.6paramiko==3.3.1pathspec==0.11.2Pillow==10.1.0platformdirs==3.11.0protobuf==4.25.0pyaoscx==2.5.0pycparser==2.21pydyf==0.8.0Pygments==2.16.1pymdown-extensions==10.3.1PyNaCl==1.5.0pynetbox==7.2.0pyphen==0.14.0pyquery==2.0.0pyrsistent==0.20.0python-dateutil==2.8.2pytz==2023.3.post1PyYAML==6.0.1pyyaml_env_tag==0.1readtime==3.0.0referencing==0.30.2regex==2023.10.3requests==2.31.0requests-toolbelt==1.0.0resolvelib==1.0.1rich==13.6.0rpds-py==0.12.0ruamel.yaml==0.18.5ruamel.yaml.clib==0.2.8six==1.16.0soupsieve==2.5subprocess-tee==0.4.1termcolor==2.3.0textfsm==1.1.3tinycss2==1.2.1tomli==2.0.1ttp==0.9.5typing_extensions==4.8.0urllib3==2.0.7watchdog==3.0.0wcmatch==8.5weasyprint==60.1webencodings==0.5.1xmltodict==0.13.0yamllint==1.32.0zipp==3.17.0zopfli==0.2.3
(venv) arne@dev:~/code/auto-netops-ansible$ pip freezeansible==8.6.0ansible-compat==4.1.10ansible-core==2.15.6ansible-lint==6.22.0ansible-pylibssh==1.1.0attrs==23.1.0Babel==2.13.1bcrypt==4.0.1beautifulsoup4==4.12.2black==23.11.0bracex==2.4Brotli==1.1.0certifi==2023.7.22cffi==1.16.0charset-normalizer==3.3.2click==8.1.7colorama==0.4.6cryptography==41.0.5cssselect==1.2.0cssselect2==0.7.0filelock==3.13.1fonttools==4.44.0future==0.18.3ghp-import==2.1.0grpcio==1.59.2html5lib==1.1idna==3.4importlib-metadata==6.8.0Jinja2==3.1.2jsonschema==4.19.2jsonschema-specifications==2023.7.1jxmlease==1.0.3libsass==0.22.0lxml==4.9.3Markdown==3.5.1markdown-it-py==3.0.0markdown2==2.4.10MarkupSafe==2.1.3mdurl==0.1.2mergedeep==1.3.4mkdocs==1.5.3mkdocs-macros-plugin==1.0.5mkdocs-material==9.4.8mkdocs-material-extensions==1.3mkdocs-simple-plugin==3.1.0mkdocs-with-pdf==0.9.3mypy-extensions==1.0.0ncclient==0.6.15netaddr==0.9.0packaging==23.2paginate==0.5.6paramiko==3.3.1pathspec==0.11.2Pillow==10.1.0platformdirs==3.11.0protobuf==4.25.0pyaoscx==2.5.0pycparser==2.21pydyf==0.8.0Pygments==2.16.1pymdown-extensions==10.3.1PyNaCl==1.5.0pynetbox==7.2.0pyphen==0.14.0pyquery==2.0.0pyrsistent==0.20.0python-dateutil==2.8.2pytz==2023.3.post1PyYAML==6.0.1pyyaml_env_tag==0.1readtime==3.0.0referencing==0.30.2regex==2023.10.3requests==2.31.0requests-toolbelt==1.0.0resolvelib==1.0.1rich==13.6.0rpds-py==0.12.0ruamel.yaml==0.18.5ruamel.yaml.clib==0.2.8six==1.16.0soupsieve==2.5subprocess-tee==0.4.1termcolor==2.3.0textfsm==1.1.3tinycss2==1.2.1tomli==2.0.1ttp==0.9.5typing_extensions==4.8.0urllib3==2.0.7watchdog==3.0.0wcmatch==8.5weasyprint==60.1webencodings==0.5.1xmltodict==0.13.0yamllint==1.32.0zipp==3.17.0zopfli==0.2.3
------------------------------
Arne Opdal
------------------------------