Developer

last person joined: 6 days ago 

Expand all | Collapse all

Aruba_config Ansible command

This thread has been viewed 13 times
  • 1.  Aruba_config Ansible command

    Posted Jan 03, 2019 08:01 AM

    I have successfully got Ansible to configure most of my procuvre configured using the Aruba_config module

     

    with the task looking something like this

    - name: SNMP Config
    aruba_config:
    lines:
    - snmp-server community "{{ site_key }}" operator unrestricted
    - snmp-server host 10.60.1.50 community "{{ site_key }}" trap-level all
    - logging "{{ logging_ip }}"
    - logging facility syslog
    - logging severity info
    - console idle-timeout 360
    - console idle-timeout serial-usb 360
    - ip default-gateway 192.168.{{ site_id }}.1
    - no oobm ip address
    - no snmp-server community "public"
    - no telnet-server

     

     

    What I am having trouble with is items which require confirmation, 

    these are username and password

    Encrypt Creds

    include creds

    SNMP v3 users. 

     

    In the command line, these would ask for confirmation, but I havet figured how to confirm with Ansible.. would anybody know how or do these items have to be configured over the REST APIs?

     

    Thanks

     



  • 2.  RE: Aruba_config Ansible command

    EMPLOYEE
    Posted Jan 16, 2019 08:19 AM

    Hi,

     

    This kind of configuration can be done through specific API/URI, which allow to configure these items without any human interaction/confirmation.

    If the module for SNMPv3, as an example, is not yet available, maybe you could enhance your playbook with your own customs tasks, in order to do this part of the configuration.

    There's an API for each items you mentionned (SNMPv3, Encrypt-credentials and Include-Credentials).

     

    Hope that helps.



  • 3.  RE: Aruba_config Ansible command
    Best Answer

    Posted Jan 25, 2019 02:46 PM

    Hello! 

     

    In regards to Ansible we recommend using our ArubaOS-Switch modules, which configure the devices using REST API. You can find a copy of the modules, the module installer, and module documentation on our GitHub here:

    https://github.com/aruba/aruba-ansible-modules

     

    In regards to command confirmation, I do know Ansible provides a module for 'expect' that can be used to confirm commands:

    https://docs.ansible.com/ansible/latest/modules/expect_module.html

     

    Hope this helps!