Developer

last person joined: 3 days ago 

Expand all | Collapse all

Arubaos Ansible REST starting

  • 1.  Arubaos Ansible REST starting

    Posted Apr 01, 2020 07:29 AM

    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.

     

     

     



  • 2.  RE: Arubaos Ansible REST starting

    Posted Apr 03, 2020 04:29 AM

    Hi jangenent

     

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



  • 3.  RE: Arubaos Ansible REST starting

    Posted Apr 03, 2020 07:09 AM

    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?



  • 4.  RE: Arubaos Ansible REST starting

    Posted Apr 23, 2020 03:48 PM

    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!