Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with aruba_command module when running against Mobility Conductor #553

Open
rtorres-github opened this issue Jun 6, 2023 · 1 comment

Comments

@rtorres-github
Copy link

rtorres-github commented Jun 6, 2023

SUMMARY

Issues with aruba_command module when running against Mobility Conductor. I can run the CLI commands against a Managed Device (Aruba Gateways) running version 8.10.0.6 but unable to do so on the Mobility Conductor. I get the following error "Unable to decode JSON from response to exec_command({"command": "show version", "prompt": null, "answer": null}). Received 'None'."

ISSUE TYPE
  • Bug Report
COMPONENT NAME

module: aruba_command
ansible_connection: "network_cli"
ansible_network_os: "aruba"

Overwrite the applied role in the task with the networkcli and aruba ansible connection and network os listed above

ADDITIONAL INFORMATION

Task is to run show commands against the Mobility Conductor and Managed Devices

- name: aruba controller browse
  hosts: "{{ device_name }}"
  roles:
    - role: arubanetworks.aos_wlan_role
  gather_facts: no
  vars:
    device_name: ""
    command_list: ""

  tasks:

    - name: show commands
      community.network.aruba_command:
        commands: "{{ item }}"
      loop: "{{ command_list }}"
      register: command_output

    - debug:
        var: command_output

    - name: print results
      run_once: yes
      debug:
        msg: "{{ lookup('template', 'command_output.j2').split('\n') }}"

command_output.j2 file:

==============
Results:
==============
{% for host in ansible_play_hosts %}
------------------------
Hostname: {{ host }}
------------------------

{% for output in hostvars[host]['command_output']['results'] %}
/// {{ host }} - {{ output['item'] }}

{{ output['stdout'][0] }}

{% endfor %}
{% endfor %}
COMMANDS TO TEST

show ap active
show ap database
show ap database-summary
show clock
show cpuload
show debug
show image version
show ip interface brief
show ip route
show logging level verbose
show memory
show configuration received
show storage
show switch ip
show version
show vlan
show lc-cluster group-membership
show switches

@Andersson007
Copy link
Contributor

@rtorres-github hello, thanks for opening the issue

@karthikeyan-dhandapani could you please take a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants