Ansible with Aruba OS Switching REST API 2930M Playbook
>> YOUR LINK HERE: ___ http://youtube.com/watch?v=MRci4GBtq44
In this video i have created a basic playbook to be able to configure a single aruba switch with one playbook command , but the same config can be applied to 100 switches at the same time by adding additional hosts to the host file. • • Hostname • • Creating VLANS and Assigning IP address to specific VLAN • • Tagging and untagging ports • • Creating Mgmt Vlan with IP • • Adding Authorized DHCP- Snooping Servers • • DNS Servers • • SNMP • • SNTP • • Syslog Server • • Interface Name • • Spanning Tree • • Loop Protect • • aaa auth • • Disable poe for port2,3 and48 • • Write Mem • Install Ansible: • sudo -E apt-add-repository --yes --update ppa:ansible/ansible • sudo apt-get update • sudo apt-get install ansible -y • ansible --version • Instal Aruba Module: • https://github.com/aruba/aruba-ansibl... • sudo apt install git -y • sudo git clone https://github.com/aruba/aruba-ansibl... • sudo python3 aruba_module_installer/aruba_module_installer.py • Sample Code: • --- • hosts: switch1 • tasks: • name: Update Switch System Attributes • arubaoss_system_attributes: • hostname: Ansible-With-ArubaOS-2930M • location: Toronto • contact: networkadmin • domain_name: Ansible.com • name: Create VLAN 20 • arubaoss_vlan: • vlan_id: 20 • name: ADMIN-NETWORK • config: create • command: config_vlan • name: Update vlan 20 with ipv4 address • arubaoss_vlan: • vlan_id: 20 • config: create • command: config_vlan_ipaddress • vlan_ip_address: 10.10.10.10 • vlan_ip_mask: 255.255.255.0 • name: UnTag port 9-14 on vlan 20 • arubaoss_vlan: • command: config_vlan_port • config: create • port_id: 9-14 • port_mode: POM_UNTAGGED • vlan_id: 20 • name: Tag port 2 on vlan 20 • arubaoss_vlan: • vlan_id: 20 • config: create • command: config_vlan_port • port_id: 2 • port_mode: POM_TAGGED_STATIC • name: Tag port 48 on vlan 20 • arubaoss_vlan: • vlan_id: 20 • config: create • command: config_vlan_port • port_id: 48 • port_mode: POM_TAGGED_STATIC
#############################