ansible-collections / community.network

Ansible Community Network Collection
http://galaxy.ansible.com/community/network
Other
124 stars 89 forks source link

aruba_config unable to save configuration on Aruba 2930F #145

Open navvisit opened 4 years ago

navvisit commented 4 years ago
SUMMARY

When trying to write the configuration on Aruba 2930F, it fails with the following message:

ansible-playbook -i hosts examples.yml -k

SSH password:

PLAY [switch01] *********************************************************************************************************************************

TASK [configure loop protect timer] **************************************************************************************************************************
fatal: [switch01]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "msg": "show configurationInvalid input: configuration\r\nswitch01#", "rc": -32603}
    to retry, use: --limit @/Users/me/.ansible-retry/examples.retry

PLAY RECAP ***************************************************************************************************************************************************
switch01      : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

This happens because show configuration is not a valid option on Aruba 2930F. Instead, show config works.

Relevant code is here

ISSUE TYPE
COMPONENT NAME

aruba_config

ANSIBLE VERSION
ansible 2.10.1
  config file = /Users/me/repos/ansible/conf/ansible-prod.cfg
  configured module search path = ['/Users/me/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/me/Library/Python/3.8/lib/python/site-packages/ansible
  executable location = /Users/me/Library/Python/3.7/bin/ansible
  python version = 3.8.2 (default, Aug 25 2020, 09:23:57) [Clang 12.0.0 (clang-1200.0.32.2)]
CONFIGURATION

Hosts:

all:
  vars:
    ansible_ssh_common_args: "-o PubkeyAuthentication=no"
    ansible_user: admin
    ansible_connection: local
    ansible_network_os: arubaos
    loop_protect_ports: "1-48"
  hosts:
    switch01
OS / ENVIRONMENT

macOS Catalina Aruba 2930F / Aruba 2530

STEPS TO REPRODUCE

Simply run the code bellow:

    - name: configure loop protect timer
      community.network.aruba_config:
        backup: true
        save_when: modified
        lines:
          - loop-protect {{ loop_protect_ports }}
          - loop-protect disable-timer 120
EXPECTED RESULTS

Config should be saved successfully.

ACTUAL RESULTS

Task fails, config file is not saved.

ansibullbot commented 3 years ago

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

ansibullbot commented 3 years ago

cc @karthikeyan-dhandapani click here for bot help

ansibullbot commented 3 years ago

@navvisit, just so you are aware we have a dedicated Working Group for network. You can find other people interested in this in #ansible-network on Freenode IRC For more information about communities, meetings and agendas see https://github.com/ansible/community

click here for bot help

pescobar commented 3 years ago

@navvisit did you manage to get the aruba_config module working on the Aruba 2930F ?

I am thinking about buying some Aruba 2930F but a hard requirement is to have proper ansible support, including idempotency, and I guess aruba_config is the main module I would need to use.

karthikeyan-dhandapani commented 3 years ago

@pescobar and @navvisit you should be using one of these role/collection for the switch / cx. Ansible role for switch "aos_switch" and "aoscx_role" for CX switch. They are available in ansible galaxy.