Original Message:
Sent: Mar 27, 2024 09:12 AM
From: Soenke Knipp
Subject: Ansible playbook special characters in password
Hi,
it is because of \.
I tried: to escape \, $, ', and ", use a double quotation mark around the password or use the back slash (\) as the escape character.
But that doesn't seem to work.
HPE Aruba 2930M 48G PoE+ Switch (JL322A)
Image Size (bytes) Date Version
----------------- ------------ -------- --------------
Primary Image : 30252184 05/17/23 WC.16.11.0012
Original Message:
Sent: Mar 27, 2024 04:13 AM
From: alagoutte
Subject: Ansible playbook special characters in password
Hi Marc,
What the special character do you are using ?
What the switch model / firmware ?
May be also report the issue on github repo issue
https://github.com/aruba/aos-switch-ansible-collection/issues
------------------------------
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: Mar 26, 2024 11:41 AM
From: Soenke Knipp
Subject: Ansible playbook special characters in password
Hello,
I can configure the switch via ssh and rest api using the following options in my hosts file:
10.0.232.254 ansible_network_os=arubanetworks.aos_switch.arubaoss ansible_connection=local ansible_user=admin
I start the playbook with the following parameters and ask for the password:
ANSIBLE_NETWORK_GROUP_MODULES=arubaoss ansible-playbook conf_vlan.yml -i hosts.txt --ask-pass
normal passwords without special characters work just fine.
when I use a password that includes special characters I get the following error:
TASK [Create Vlan] *******************************************************************************************************************************************
failed: [10.0.232.254] (item={'vlanid': '1000', 'vlanname': 'INT-Clients_1'}) => {"ansible_loop_var": "item", "body": "{\"message\":\"Authentication failed.\"}", "changed": false, "connection": "close", "content-type": "application/json", "item": {"vlanid": "1000", "vlanname": "INT-Clients_1"}, "msg": "HTTP Error 400: Bad Request", "requestid": "", "server": "eHTTP v2.0", "status": 400, "transfer-encoding": "chunked", "url": "http://10.0.232.254:80/rest/v6.0/login-sessions"}
When I connect with ssh or the webui with the special character password there is no problem at all.
If something is wrong or stupid, please enlighten me.
Best Regards
Marc