Ansible collection to support Alcatel-Lucent Enterprise OmniSwitch aos devices (aos6 & aos8)
The Alcatel collection supports network_cli connections.
Network OS | Description |
---|---|
jefvantongerloo.alcatel.aos | Use aos cliconf to run command on ALE aos platform |
Name | Description |
---|---|
ansible.netcommon.cli_command | Run a cli command on aos device |
ansible.netcommon.cli_config | Push text based configuration to aos over network_cli |
ansible.netcommon.net_get | Copy a file from the aos device to Ansible Controller |
ansible.netcommon.net_put | Copy a file from Ansible Controller to the aos device |
Name | Description |
---|---|
jefvantongerloo.alcatel.device_info | Get ALE Omniswitch device information dictionary |
Collection distribution is viaAnsible-Galaxy
Install the Python Textfsm-aos and Ansible-pylibssh packages:
pip install -r requirements.txt
You can install the jefvantongerloo.alcatel
collection with the Ansible Galaxy CLI:
ansible-galaxy collection install jefvantongerloo.alcatel
You can also include it in the requirements.yml
file and install it with ansible-galaxy collection install -r requirements.yml
, using the format:
---
collections:
- name: jefvantongerloo.alcatel
To use this collection make sure to set required inventory host parameters, for example:
---
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: jefvantongerloo.alcatel.aos
ansible_user: admin
ansible_password: switch
---
- name: test device_info module
connection: network_cli
hosts: all
gather_facts: no
tasks:
- name: device_info test
jefvantongerloo.alcatel.device_info:
register: device_info
- name: debug device_info
debug:
msg: "{{ device_info }}"
---
- name: cli_command
connection: network_cli
hosts: all
gather_facts: no
tasks:
- name: cli_command test
cli_command:
command: show chassis
register: chassis
- name: debug cli_command output
debug:
msg: "{{ chassis }}"
---
- name: cli_config backup
connection: network_cli
hosts: all
gather_facts: no
tasks:
- name: cli_config backup test
cli_config:
backup: yes
backup_options:
dir_path: tmp
register: backup_running
- name: debug backup_running
debug:
msg: "{{ backup_running }}"
---
- name: Copy file from aos device
connection: network_cli
hosts: all
gather_facts: no
tasks:
- name: net_get test
ansible.netcommon.net_get:
src: /flash/working/vcboot.cfg
dest: tmp/vcboot.cfg
protocol: sftp
---
- name: Copy file to aos device
connection: network_cli
hosts: all
gather_facts: no
tasks:
- name: net_put test
net_put:
src: tmp/vcboot.cfg
dest: /flash/vcboot.cfg
protocol: sftp