Closed nnorakk closed 5 years ago
Hi nnorakk,
Do you see this response consistently or once in a while?
At this point, the showcommand api has its limitations. We will raise a ticket. But for the time being, if you really need the showcommand output, you could use SSH/CLI based tasks in your ansible playbook along with the REST API tasks.
You could use aruba_command and aruba_config ansible modules which is present in your ansible installation. If the AOS version of you controller is 8.x+, you need to make this fix by yourself, as it is not merged to ansible github yet.
Fix for AOS8.X, SSH/CLI based Aruba module, https://github.com/ansible/ansible/pull/54261/commits
Dev Forum Discussion, https://community.arubanetworks.com/t5/Developer-Community/Ansible-Controller-Issues-Examples/td-p/548574
Sample Playbook with aruba_command API, (If the command output takes a while to appear, you could increase the timeout in the provider)
- name: Sample Playbook for mobility master SSH command
hosts: controller
connection: local
gather_facts: no
vars_files:
- mm_variables.yml
tasks:
- name: CLI task for show user command
aruba_command:
commands: "show user name 001584161627"
interval: 300
provider: "{{ provider }}"
Sample Variable File
provider:
username: "admin"
password: "admin"
host: "1.1.1.1"
timeout: 360
closing issue due to workaround being provided and no update
I modified show_command.yml example to list clients like:
When I run:
I do not get list but the answer: "This operation can take a while depending on nubmer of users. Please be patient ..."