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

Using the AOS WLAN Ansible Role

Introduction to the AOS8 Ansible Role

本节讨论我们的Ansible资源es 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 theAOS WLAN roleor 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-fto 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.Dformat
  • ansible_user: Username for mobility conductor/standalone inplaintextformat
  • ansible_password: Password for mobility conductor/standalone inplaintextformat
  • ansible_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: SetTrueas AOS uses port 4343 for REST
  • ansible_httpapi_validate_certs: SetTrueorFalsedepending on if Ansible should attempt to validate certificates

Sample Inventories:

Sampleinventory.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

Sampleinventory.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 throughGithub
set role toaos-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 throughGalaxy
set role toarubanetworks.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.


Did this page help you?
Baidu