Open Yannik opened 3 years ago
The same issue has been reported here: https://github.com/ansible/ansible/issues/70275
Any chance this is going to be looked at? @Yannik do you happen to have a work around? I am deploying some 9100's and need a way to backup configs automatically.
@afc-ict I looked into it, but wasn't able to find a work around for this issue.
cc @karthikeyan-dhandapani click here for bot help
I started having the same issue on my machine all of a sudden - everything worked perfectly fine beforehand, and something happened between a week ago and now that broke it. This is an airgapped system, so there wouldn't have been any external updates - just something either I did to my workstation or something that happened with the switch.
Will continue investigating - a full factory reset of the switch is next on my list.
Factory reset changed nothing, unfortunately, so it's definitely controller-side. The error is exactly the same as the error I get when trying to connect to a dead IP address, too, which might be a hint in some way.
Hey @Nihlus not directly related but I ended up getting around this using a different role: arubanetworks.aoscx_role
Example:
[ansible@auto101mdf ansible]$ cat aruba-config-backup.yml
---
- hosts: aruba_switches_backstage
roles:
- role: arubanetworks.aoscx_role
vars:
ansible_connection: httpapi
ansible_user: XXXXXXX
ansible_password: XXXXXXX
ansible_network_os: aoscx
ansible_python_interpreter: '/usr/bin/python3'
ansible_httpapi_validate_certs: False
ansible_httpapi_use_ssl: True
ansible_acx_no_proxy: True
gather_facts: False
tasks:
- name: Backup config
aoscx_backup_config:
config_name: 'running-config'
output_file: '/etc/ansible/backups/network/switches/{{ inventory_hostname }}.config'
Maybe this will assist?
This remains an isssue for me, and it seems the aos_switch collection is also experiencing the same fault: https://github.com/aruba/aos-switch-ansible-collection/issues/85
While testing again, I noticed that my smartcard reader that contains my SSH key does not light up when attempting to run the playbook, suggesting Ansible isn't trying to use the stored SSH keys at all.
EDIT: found the issue, at least for me - paramiko does not work with external SSH keys, so ansible-pylibssh must be installed for this to work. On Debian, this package is not available in the repos, so it has to be installed via pip at a system level instead.
EDIT 2: another note for other people having the same issue - aruba_config and friends does not properly display a prompt for unknown host keys, so make sure you've SSH'd into the device using both its FQDN and IP address before you attempt to run the module. Both must be reachable without any host key prompting.
@karthikeyan-dhandapani you mentioned as a module maintainer in BOTMETA.yml file, could you please take a look? In case of no response from the maintainer, here's a quick-start dev guide if there are other volunteers to fix the issue.
Hi,
I've noticed a similar issue on the https://github.com/aruba/aos-switch-ansible-collection/issues/55 So I wonder if they are related.
Do you have password configuration-control
configured on the switch?
The reason I ask Is I've been having issues with running command / config ansible playbooks and got the same error above:
"stderr": "Unable to decode JSON from response to exec_command('show running-config'). Received 'None'.",
From my testing (using a radius auth user) I was able to get it working by disabling the password config-control.
This is on both 16.10 & 16.11 on Aruba 2930M switch
SUMMARY
I'm trying to configure an Aruba AP-303 via
community.network.aruba_command
/community.network.aruba_config
.All commands fail with the error
Unable to decode JSON from response to exec_command({"command": "show version", "prompt": null, "answer": null}). Received ''None''.
ISSUE TYPE
COMPONENT NAME
community.network.aruba_command
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
ArubaOS 8.6.0.11
STEPS TO REPRODUCE
hosts file:
playbook:
EXPECTED RESULTS
Show version of aruba ap
ACTUAL RESULTS