Home Guides API Reference
Guides API Reference GitHub Airheads Developer Community Log In

Using Aruba SSH Ansible Modules

Installing and using the Aruba SSH Ansible Modules

Installing SSH Modules

Aruba's SSH modules for AOS 8 based devices are packaged along side modules for some other products like Airwave, Activate, ClearPass, etc. in this repository onGithub.

The aruba_module_installer.py tool located under aruba_module_installer folder, installs all files/directories required by Ansible for WLAN module integration.

Two modules are available as SSH modules:

  1. aruba_config: For passing CLI configuration commands using a playbook
  2. aruba_command: For passing all the non-configuration commands (where config prompt is not needed) using a playbook

Requirements

  • Linux operating system
  • Python 2.7 or 3.5+
  • Ansible version 2.5 or later

How to run this code

From command line:

$ python aruba_module_installer.py

If you receive a permission error, use 'sudo':

$ sudo python aruba_module_installer.py

In order to run these scripts, please complete the steps below:

  1. Install Python version 2.7 or 3.5+ on the system.
  2. Install Ansible 2.5 or later

Note

The module installer script will install modules into Ansible default module folder

How to install updates or new modules

进入克隆目录并把任何更新from the repository:

$ cd aruba-ansible-modules $ git pull

Run the python installer with the--reinstalloption, remember to usesudoif you receive a permission error:

$ sudo python aruba_module_installer/aruba_module_installer.py --reinstall

Optional Arguments

optional arguments: -h, --help show this help message and exit -r, --remove remove all files & directories installed by this script. --reinstall remove all files & directories installed by this script. Then re-install. --switch only install files/directories required for AOS-Switch.

The variables that should be defined in your inventory/host file for your AOS 8 host are:

  • ansible_host: IP address of mobility conductor/standalone inA.B.C.Dformat
  • ansible_user: Username for mobility conductor/standalone inplaintextformat
  • ansible_password: Password for mobility conductor/standalone inplaintextformat
  • ansible_connection: Must always be set tolocal
  • ansible_network_os: Must always be set toaruba

Sample Inventories:

Sampleinventory.yml:

all: hosts: controller: ansible_host: 10.1.1.1 ansible_user: admin ansible_password:[email protected]ansible_connection: local ansible_network_os: aruba
aruba_1 ansible_host=10.1.1.1 ansible_user=admin[email protected]ansible_connection=local ansible_network_os=aruba

Example Playbook

--- - name: configure top level configuration aruba_config: lines: hostname {{ inventory_hostname }}

Did this page help you?
Baidu