Original Message:
Sent: Dec 22, 2023 05:23 AM
From: alagoutte
Subject: REST API - Error When trying to conenct with ansible
May be need update to README @Tiffany.Chiapuzio-Wong
------------------------------
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: Dec 22, 2023 04:47 AM
From: ebozec
Subject: REST API - Error When trying to conenct with ansible
I had those two lines but I did not think to replace radius by tacacs...
It worked! Thank you very much!
Original Message:
Sent: Dec 22, 2023 04:37 AM
From: alagoutte
Subject: REST API - Error When trying to conenct with ansible
do you have
switch(config)# aaa authentication rest login radius localswitch(config)# aaa authentication rest enable radius local
on your config ? (need to replace radius by tacacs on this case)
------------------------------
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: Dec 22, 2023 04:28 AM
From: ebozec
Subject: REST API - Error When trying to conenct with ansible
Bonjour Alexis,
The switch I am working on is an Aruba 2930F ( WC.16.01.0010) with VSF enabled. I'm using a tacacs account
The error I posted was when trying with no ssl, I had the line commented, sorry about that.
Still, here's the error, vith verbose :
fatal: [CSXXX_MS12_SW_COEUR]: FAILED! => { "body": "{\"message\":\"Authentication failed.\"}", "changed": false, "connection": "close", "content-type": "application/json", "invocation": { "module_args": { "acl_direction": null, "acl_id": null, "acl_type": "AT_STANDARD_IPV4", "api_version": "None", "command": "config_vlan", "config": "create", "helper_addresses": "", "host": "10.120.3.65", "igmp_version": 2, "interval": 125, "ip_address_mode": "IAAM_STATIC", "is_dhcp_server_enabled": false, "is_dsnoop_enabled": false, "is_igmp_enabled": false, "is_jumbo_enabled": false, "is_management_vlan": false, "is_querier_enabled": true, "is_voice_enabled": false, "last_member_query_interval": 1, "name": "ansible_test", "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "port": 80, "port_id": "", "port_mode": "POM_UNTAGGED", "provider": { "api_version": "None", "host": "10.120.3.65", "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "port": 80, "ssh_keyfile": null, "timeout": 30, "transport": "aossapi", "use_proxy": false, "use_ssl": false, "username": "SVCACC_ANSIBLE_SW", "validate_certs": false }, "qos_policy": null, "query_max_response_time": 10, "robustness": 2, "ssh_keyfile": null, "status": "VS_PORT_BASED", "timeout": 30, "use_ssl": false, "username": "SVCACC_ANSIBLE_SW", "validate_certs": false, "version": "IAV_IP_V4", "vlan_id": 900, "vlan_ip_address": "", "vlan_ip_mask": "", "vlantype": "VT_STATIC" } }, "msg": "HTTP Error 400: Bad Request", "requestid": "", "server": "eHTTP v2.0", "status": 400, "transfer-encoding": "chunked", "url": "http://10.120.3.65:80/rest/v6.0/login-sessions"}
Original Message:
Sent: Dec 22, 2023 04:10 AM
From: alagoutte
Subject: REST API - Error When trying to conenct with ansible
Bonjour Etienne,
Can you try without use_ssl: true ? (or add port: 443 ?)
Also what switch model and firmware ? do you use RBAC or local account ?
------------------------------
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