Hi!
Cannot get this to work, help much appreciated.
Switches I am testing it with are HP J9772A 2530-48G-PoEP. Software revision YA.16.06.0006.
Using following simple playbook. Second task works, but first doesn`t.
ilia@psg-ans01:~/ANS$ cat pb_test.yml
---
- hosts: all
tasks:
- name: Create VLAN 300
arubaoss_vlan:
command: config_vlan
vlan_id: 300
name: "vlan300"
- name: Update Switch System Attributes
arubaoss_system_attributes:
hostname: "TestSW"
Error messages are as following:
ilia@psg-ans01:~/ANS$ ansible-playbook pb_test.yml -i inv_switch1.yml
PLAY [all] **********************************************************************************************************************************************************************************************************************************
TASK [Gathering Facts] **********************************************************************************************************************************************************************************************************************
ok: [switch1]
TASK [Create VLAN 300] **********************************************************************************************************************************************************************************************************************
fatal: [switch1]: FAILED! => {"body": "{\"message\":\"Invalid parameters\"}", "changed": false, "connection": "close", "content-type": "application/json", "msg": "HTTP Error 400: Bad Request", "requestid": "", "server": "eHTTP v2.0", "status": 400, "transfer-encoding": "chunked", "url": "http://192.168.1.11:80/rest/v5.0/vlans"}
[WARNING]: Could not create retry file '/home/ilia/ANS/pb_test.retry'. [Errno 13] Permission denied: u'/home/ilia/ANS/pb_test.retry'
PLAY RECAP **********************************************************************************************************************************************************************************************************************************
switch1 : ok=1 changed=0 unreachable=0 failed=1
I also tried all tasks from example files including others that use VLAN submodule. They work OK and I was able to delete test VLAN just fine.
Direct call(via browser) on http://192.168.1.11/rest/v5.0/vlans works:
{"collection_result":{"total_elements_count":1,"filtered_elements_count":1},"vlan_element":[{"uri":"/vlans/1","vlan_id":1,"name":"DEFAULT_VLAN","status":"VS_PORT_BASED","type":"VT_STATIC","is_voice_enabled":false,"is_jumbo_enabled":false,"is_dsnoop_enabled":false,"is_management_vlan":false}]}
PS: Tiffany - thanks for tutorials, carry on!