Skip to content

jefvantongerloo/ansible-aos-demo

Repository files navigation

Build Status

ansible-aos-demo

Backup Alcatel-lucent Enterprise AOS6 and AOS8 devices.

Contains all relevant files for blogpost: Backup Alcatel-Lucent Enterprise Omniswitch AOS6 & AOS8 using Ansible

Overview

Backup all ALE aos6 and aos8 Omniswitch devices using CLI or REST API. Output connectors can be turned on to store backups to different locations: local, git, ...

Default transport connection

  • AOS6: CLI connection
  • AOS8: REST api

Output connectors

  • Local
  • Git

Installation

  1. Install Python requirements
pip3 install -r requirements.txt
  1. Install Ansible-galaxy collections
ansible-galaxy collection install -r requirements.yml

Configuration

  1. Add hosts to inventory.yml file
---
all:
  hosts:
    NET-SWI-001:
      ansible_host: <change_me>
      device_vendor: alcatel
      device_os: aos8
  1. Alter credentials in group_vars/all/all.yml
---
ale_username: admin
ale_password: switch
  1. Select output connectors
---
backup_local: true
backup_git: false
  1. Optional: set git parameters
git_token: "<change_me>"
git_username: "<change_me>"
git_url: "<change_me>"
git_branch: "master"
  1. call playbook from command line
ansible-playbook backup-all.yml

Note for production:

Use Ansible vault encrypted variables to store credentials

ansible-vault encrypt vault.yml