Developer Community

Reply
Aruba Employee

How to Install Ansible and Aruba Ansible Modules on Ubuntu 18.04

These below instructions are for installing Ansible and the Aruba Ansible Modules to an Ubuntu 18.04 Linux machine.

Aruba Ansible Modules currently support the following products:

  • AOS-CX
  • AOS-Switch
  • Aruba Activate
  • Aruba Airwave
  • Aruba Clearpass
  • ArubaOS Controller

 

You can install Ansible through 1 of 2 methods:

  1. Through apt-get (or any other package installer if using a different version of Linux) :
  • First you’ll need to add the repository to your package installer: 
    sudo apt-add-repository --yes --update ppa:ansible/ansible
  • Then install ansible: 
    sudo apt-get install ansible
  1. Through git:
  • Clone the latest developer version of Ansible through this Git clone command: 
    git clone https://github.com/ansible/ansible.git --recursive
  • Change into the cloned ansible directory and set up your environment by running the script in the directory hacking:
    cd ansible
    source ./hacking/env-setup


Once Ansible is installed, validate its installation was completed successfully by executing the below command and validating its output, your output will look slightly different when using the developer version of Ansible:

$ ansible --version
ansible 2.7.2
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/administrator/.ansible/plugins/modules', 	 				  u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.15rc1 (default, Nov 12 2018, 14:31:15) [GCC 7.3.0]

Now that you have Ansible installed you’re ready to install the Aruba Ansible Modules.

 

For AOS-CX Modules install the AOS-CX Role using the following command AFTER you've installed Ansible:

ansible-galaxy install arubanetworks.aoscx_role

For all other supported Aruba You’ll need to download a copy of the Aruba Ansible Modules Github and run the module installer script:

  1. Download or clone a copy of the Aruba Ansible Modules Github to your Ubuntu machine:
    git clone https://github.com/aruba/aruba-ansible-modules.git
  1. Change into the newly created aruba-ansible-modules directory and run the module installer in the aruba_module_installer folder, you may need elevated permissions using the keyword sudo:
    cd aruba-ansible-modules
    
    sudo python aruba_module_installer/aruba_module_installer.py
  1. Next is to validate your Aruba modules have been installed correctly, you can do this by executing one of the example playbooks in the aruba-ansible-modules/example_playbooks directory. For each product’s modules there exists a sample inventory file to use with the modules. If necessary you might have to modify the sample inventory file to match the information of your device. For AOS-Switch refer to How to Run a Playbook on AOS-Switch .
Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: