aruba / aruba-ansible-modules

Aruba Ansible Modules
Apache License 2.0
80 stars 36 forks source link

How to use AnyCLI #8

Closed louisfrancoisSO closed 5 years ago

louisfrancoisSO commented 5 years ago

Hello again,

I'm starting to work more with your modules and I have questions on what's possible or not. In Aruba v16.04, there are new functionnalities AnyCLI and Batch_CLI. Those REST API functions are quite useful and I was wondering if it was possible to use them in your module.

FYI, the URI is http(s)://IP/rest/v3/cli with a JSON

{ "cmd" : "" }

For example, I would like do show version on my switchs. So something like

- host: switch1
tasks: 
  - name: show version
    aruba_cli: 
      cmd: show version

So first, is it possible to use it? I have not seen it in the different files on the Git If not, how to get info like this?

Thank you,

Louis

alagoutte commented 5 years ago

it is possible to have a API for get directly version (like rest/vX/system...)

tchiapuziowong commented 5 years ago

Hi!

There are a couple options to using AnyCli or even SSH CLI. Please see this post on our Airheads Developer Community! https://community.arubanetworks.com/t5/Developer-Community/How-to-install-use-CLI-modules-and-tasks-for-Switch-and-CX-in/td-p/534333

For 'How-To' questions, please use this forum as a resource!

Thanks!

louisfrancoisSO commented 5 years ago

Hello,

The post you sent use another github project. Yours is way simpler so I would prefer to keep everything in here. Moreover the inventories are different in both projects so it is not possible to use both at the same time for the same targets. That's why I was asking.

it is possible to have a API for get directly version (like rest/vX/system...)

Yes but my goal is to use Ansible, that will use the API (or via SSH).