Developer

 View Only
last person joined: 2 hours ago 

Expand all | Collapse all

Manage Aruba 2930F over Ansible - Error Request failed

This thread has been viewed 8 times
  • 1.  Manage Aruba 2930F over Ansible - Error Request failed

    Posted Nov 19, 2023 08:54 PM
    Hello everyone
    I have an Aruba 2930F switch in my test environment.
    I would like to manage it via Ansible and capture vlans, for example.
    I have defined the host in host.yml
    host.yml 
    all:
      hosts:
    switch01:
      ansible_host: 10.68.68.1
      ansible_user: manager
      ansible_password: ***
      ansible_connection: local
      ansible_network_os: arubanetworks.aos_switch.arubaoss
      
      
    I have also written a playbook, see below "config_vlan.yml"
    config_vlan.yml
    ---
    - hosts: all
      collections:
    - arubanetworks.aos_switch
      tasks:
    - name: Create VLAN 400
      arubaoss_vlan:
    vlan_id: 400
    name: "vlan400"
    config: "create"
    command: config_vlan
    Unfortunately there is this error message when running:
        },
        "msg": "Request failed: <urlopen error [Errno -2] Name or service not known>",
        "status": -1,
        "url": "http://None:80/rest/v6.0/login-sessions"
    I have connected to the REST API with this command. This works and I was also able to capture VLANs.
    curl --noproxy 10.68.68.1 -X POST http://10.68.68.1:80/rest/v1/login-sessions -d '{"userName":"manager","password":"***"}'
     
    Does anyone have any idea what I am doing wrong.


  • 2.  RE: Manage Aruba 2930F over Ansible - Error Request failed

    MVP GURU
    Posted Nov 20, 2023 03:04 AM

    Hi,

    What firmware version ?

    Do you have configure Settings Environnement Variable ? => https://github.com/aruba/aos-switch-ansible-collection#setting-environment-variables



    ------------------------------
    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
    ------------------------------