Developer Community

Reply
Highlighted
New Contributor

Arubaos Ansible REST starting

Hallo,

 

This is my first post here on Airheads.

The company i work for is experimenting with Ansible for managing and basic configuring switches and firewalls.

Everything works fine and i can use a couple of Ansible playbooks but when i try to run playbooks that make use of the REST api things go wrong.

 

First of all, what is the best "method" or aruba-ansible module to manage and configure devices? Currently i try to use  aruba-ansible-modules and aruba-switch-ansible.

 

As i understand, both have different methods and capabilities.

 

I followed the aruba bots ansible series on Youtube and learned a lot from it.

The (test)switch i use is a Aruba 2530 switch.

Firmware

 

I run Ansible 2.5.1 and python 2.7.17

 

In Ansible changing the hostname with:

arubaoss_system_attributes:

   hostname: "name"

and creating a vlan via

arubaoss_vlan:

  command: config_vlan

  ...

works fine

 

when itry to use

arubaoss_routing:

   state: create

   ...

 

i get an error. Error 404 Not Found. Connection Close {server": "eHTTP v2.0", "status": 404, "url": "http://172.31.254.160:80/rest/v7.0/ip-route/settings"}

 

It seems something in REST API isnt working properly. But show rest-interface gives me:

REST Interface : Enabled
REST Operational Status : Up
REST Session Idle Timeout : 600 seconds
HTTP Access : Enabled
HTTPS Access : Disabled

 

Can someone please point me in the right direction?

If extra info is required i would like to hear.

 

Thanks in advance.

 

 

 

Highlighted
MVP Guru Elite

Re: Arubaos Ansible REST starting

Hi jangenent

 

the 2530 is a L2 switch and it is not possible to have ip routing...



PowerArubaSW: Powershell Module to use Aruba Switch API for Vlan, VlanPorts, LACP, LLDP... More info

PowerArubaCP: Powershell Module to use ClearPass API (create NAD, Guest...) More info

PowerArubaCX: Powershell Module to use ArubaCX API (get interface/vlan/ports info)

PowerArubaIAP: Powershell Module to use Aruba Instant AP

PowerArubaMC: Powershell Module to use Mobility Controller / Master


ACMP 6.4 / ACMX #107 / ACCP 6.5 / ACSP
Highlighted
New Contributor

Re: Arubaos Ansible REST starting

Hi Alagoutte,

You are right and indeed the 2530 is a L2 switch and it is not possible to have ip routing... That was a dumb thing to try. I forgot to mention that also other REST commands didnt work (example reboot, and i am sure the switch supports reboot haha).

Anyway thanks for the list of different methods to use the switch. As i understand, most of the links you gave me are not specific for Ansible. They can general methods that you can use to configure a switch?

Highlighted

Re: Arubaos Ansible REST starting

Hi @jangenent !

 

Here are some resources to get you started with automating with Ansible:

If you're looking into using a combination of the REST API modules with the SSH/CLI modules I recommend looking at our README.md  that explains how to use both REST API and SSH/CLI modules.

 

Please me let know if you're having any more trouble or have any more questions!

Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: