Hello,
I am very new to Ansible and wondering if someone can look into this.
I have installed the Python and Ansible as per the https://github.com/aruba/aruba-ansible-modules and videos "Aruba Bots Ansible Series 01 - 03". I can connect to the switch using the ansible modules. Please see the outupt below.
+++++++++++++++++++++++++++++++++++++++++++++
python --version
Python 2.7.16
MacBook-Pro:arubaoss tarun$ ansible --version
ansible 2.8.5
config file = None
configured module search path = ['/Users/tarun/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/Cellar/ansible/2.8.5/libexec/lib/python3.7/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 3.7.4 (default, Sep 7 2019, 18:27:02) [Clang 10.0.1 (clang-1001.0.46.4)]
MacBook-Pro:arubaoss tarun$ ansible-playbook system_attributes.yml -i switch_hosts.yml
PLAY [switch1] ***********************************************************************************************************************************************************************
TASK [Gathering Facts] ***************************************************************************************************************************************************************
ok: [switch1]
TASK [Update Switch System Attributes] ***********************************************************************************************************************************************
changed: [switch1]
PLAY RECAP ***************************************************************************************************************************************************************************
switch1 : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
MacBook-Pro:arubaoss $
+++++++++++++++++++++++++++++++++++++++++++++
However I am unable to use the SSH/CLI module as mentioned in the Aireheads community https://community.arubanetworks.com/t5/Developer-Community/How-to-install-use-CLI-modules-and-tasks-for-Switch-and-CX-in/td-p/534333/highlight/false
++++++++++++++++++++++++++++++++++++++++++
$ansible-playbook cli-test.yml -i switch_hosts.yml
ERROR! 'arubaos_switch_ssh_cli' is not a valid attribute for a Play
The error appears to have been in '/home/tarun/aruba-ansible-modules/example_playbooks/arubaoss/cli-test.yml': line 1, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: Check if upload is completed
^ here
cat cli-test.yml
- name: Check if upload is completed
arubaos_switch_ssh_cli:
ip: 10.0.0.254
user: netadmin
password: netadmin
# This will execute each command through the CLI and return the CLI Output
show_command: ["show flash", "show version"]
# The result will have the CLI Output
+++++++++++++++++++++++++++++++++++++++++