Using the AOS WLAN Ansible Role
Introduction to the AOS8 Ansible Role
This section talks about our Ansible resources to help you in your automation journey. We have published an Ansible Role with API based modules, and other SSH modules to build a variety of workflows for AOS 8 devices.
AOS WLAN Role
This Ansible Network role provides a set of platform dependent configuration management modules specifically designed for the AOS Mobility Conductors and Standalone Managed Devices. You can also visit Ansible Galaxy to access the AOS WLAN role or follow the instructions below.
Requirements
- Python 2.7 or 3.5+
- Ansible 2.8.1 or later
- Minimum supported AOS firmware version 8.0
Installation
Through GitHub, use the following command. Use option -f
to overwrite current role version:
ansible-galaxy install git+https://github.com/aruba/aos-wlan-ansible-role.git
Through Galaxy:
ansible-galaxy install arubanetworks.aos_wlan_role
Inventory Variables
The variables that should be defined in your inventory for your AOS host are:
ansible_host
: IP address of mobility conductor/standalone inA.B.C.D
formatansible_user
: Username for mobility conductor/standalone inplaintext
formatansible_password
: Password for mobility conductor/standalone inplaintext
formatansible_connection
: Must always be set tohttpapi
ansible_network_os
: Must always be set toaos
ansible_httpapi_port
: Must always be set to4343
ansible_httpapi_use_ssl
: SetTrue
as AOS uses port 4343 for RESTansible_httpapi_validate_certs
: SetTrue
orFalse
depending on if Ansible should attempt to validate certificates
Sample Inventories:
Sample inventory.yml
:
all:
hosts:
mobility_conductor:
ansible_host: 10.1.1.1
ansible_user: admin
ansible_password: password
ansible_connection: httpapi
ansible_network_os: aos
ansible_httpapi_port: 4343
ansible_httpapi_validate_certs: True
ansible_httpapi_use_ssl: True
Sample inventory.ini
:
aos_1 ansible_host=10.1.1.1 ansible_user=admin ansible_password=password ansible_connection=httpapi ansible_network_os=aos ansible_httpapi_port=4343 ansible_httpapi_validate_certs=True ansible_httpapi_use_ssl=True
Example Playbook
If role installed through GitHub
set role to aos-wlan-ansible-role
:
---
- hosts: all
roles:
- role: aos-wlan-ansible-role
tasks:
- name: Create a radius server
aos_api_config:
method: POST
config_path: /md/SLR
data:
- rad_server:
- rad_server_name: test-dot1x
rad_host:
host: 1.1.1.1
If role installed through Galaxy
set role to arubanetworks.aos_wlan_role
:
---
- hosts: all
roles:
- role: arubanetworks.aos_wlan_role
tasks:
- name: Create a radius server
aos_api_config:
method: POST
config_path: /md/SLR
data:
- rad_server:
- rad_server_name: test-dot1x
rad_host:
host: 1.1.1.1
Using the above example and available modules you can create multiple workflows to perform initial deployments, execute incremental changes as well as monitor and fetch information.
Updated 5 months ago