Skip to content

ArubaOS Switch Module Configuration Example

tchiapuziowong edited this page May 20, 2019 · 2 revisions

Description

This Workflow is an example of using Aruba Switching Modules to Automate configuration of ArubaOS-Switch.

Workflow

This workflow will either configure or unconfigure an ArubaOS-Switch based on the value of the variable state.

  • When state is set to configure, using Aruba Switching Modules, Ansible will do the following using REST API:

    • Configure device's hostname
    • Configure VLAN 42
    • Change loop-protect mode to VLAN
    • Enable loop-protect on VLAN 42
    • Tag VLAN 42 on port 1
    • Configure IP address on VLAN 42
    • Configure DHCP helper address on VLAN 42
  • When state is set to unconfigure, using Aruba Switching Modules, Ansible will do the following using REST API:

    • Change loop-protect mode to Default
    • Remove port 1 from VLAN 42
    • Remove IP address from VLAN 42
    • Remove DHCP helper address from VLAN 42
    • Remove VLAN 42
    • Changes hostname

Prerequisites

Set Up Inventory

Set up your inventory as described in Project Inventory Set Up

Enable REST on Switch

ArubaOS-Switch:

switch(config)# web-management
switch(config)# web-management ssl
switch(config)# rest-interface

Execution

  • Run via: "ansible-playbook arubaoss_module_config_example.yml -e site=branch1" (Assuming current directory is "aruba-switch-ansible" and all pre-configurations have taken place)