All Ansible modules, module installer, and sample playbooks for ArubaOS-Switch and ArubaOS-CX.
- ArubaOS-CX and ArubaOS-Switch Ansible modules and files are stored in aos_wired_module_installer/src.
- ArubaOS-CX Ansible playbook examples are stored in example_playbooks/arubaoscx
- ArubaOS-Switch Ansible playbook examples are stored in example_playbooks/arubaoss
- Documentation of ArubsOS-CX and ArubaOS-Switch modules are located in module_documentation/
The aos_wired_module_installer.py tool installs all files/directories required by Ansible for Aruba-OS Switch and CX integration.
- Linux operating system
- Python 2.7
- Ansible version 2.5 or later
- Directories added:
- <ansible_module_path>/modules/network/arubaoss
- <ansible_module_path>/modules/network/arubaoscx
- <ansible_module_path>/module_utils/network/arubaoss
- Files added/modified:
- <ansible_module_path>/plugins/action/arubaoss.py
- <ansible_module_path>/plugins/connection/arubaoscx_rest.py
- <ansible_module_path>/config/base.yml
From command line:
$ python aos_wired_module_installer.py
If you receive a permission error, use 'sudo':
$ sudo python aos_wired_module_installer.py
In order to run these scripts, please complete the steps below:
-
Install Python version 2.7 on the system.
-
Install Ansible 2.5 or later (refer https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html).
optional arguments:
-h, --help show this help message and exit
-r, --remove remove all files & directories installed by this script.
--cx only install files/directories required for ArubaOS-CX.
--switch only install files/directories required for ArubaOS-Switch.
Below you'll find step by step instructions on how to run an example playbook on your ArubaOS-Switch or CX device.
Follow the above steps to install the ArubaOS-CX and ArubaOS-Switch Ansible modules.
- Assign an IP address to the management interface of your CX device. Ensure that the IP address is reachable from your Ansible control machine.
- Enable REST on your CX device with the following commands:
switch(config)# https-server rest access-mode read-write switch(config)# https-server vrf mgmt
- Modify the IP address in the hosts file example_playbooks/arubaoscx/cx_hosts.yml to match the IP of your CX device.
- Modify the ansible_user and ansible_password in the hosts file example_playbooks/arubaoscx/cx_hosts.yml to match the login information of your CX device.
- Assign an IP address to the management interface of your Switch device. Ensure that the IP address is reachable from your Ansible control machine.
- Enable REST on your Switch device with the following commands:
switch(config)# web-management ssl switch(config)# rest-interface
- Modify the IP address in the hosts file example_playbooks/arubaoss/switch_hosts.yml to match the IP of your Switch device.
- Modify the ansible_user and ansible_password in the hosts file example_playbooks/arubaoss/switch_hosts.yml to match the login information of your Switch device.
To execute a playbook run the following command from the Linux machine, replace playbook_file with the desired playbook and either cx_hosts.yml or switch_hosts.yml:
$ ansible-playbook [playbook_file] -i [cx_hosts.yml|switch_hosts.yml]