gmoisio.ale_aos

ALE_AOS

This is an Ansible role that allows you to manage Alcatel-Lucent Enterprise OmniSwitch devices.

Note: This role is no longer maintained and has been replaced by an Ansible Collection.

Requirements

You need to have:

  • Ansible version 2.9.2 or higher
  • Netmiko version 2.4.2 or higher

Example Playbook

Here’s a simple example of how to test the ale_aos_ping module:

- name: This is a test for ale_aos_ping module
  hosts: ale
  connection: local
  roles:
    - gmoisio.ale_aos
  vars:
    ansible_python_interpreter: "python"
  tasks:
    - name: Test ale_aos_ping Python module
      ale_aos_ping:
        host: "{{ inventory_hostname }}"
        username: admin
        password: switch
      register: result
    - debug: var=result

To make the output more readable, add this to your ansible.cfg file:

[defaults]
stdout_callback = yaml

Modules

1. ale_aos_ping

  • Short description: Check SSH connectivity for an ALE OmniSwitch device.
  • Requirements: Netmiko version 2.4.2 or higher

Options:

  • host: The name of the host (required).
  • port: SSH port (default is 22, optional).
  • username: Login username (required).
  • password: Login password (required).
  • check_string: String to check in the output (default is '>', optional).

Example:

- ale_aos_ping:
    host: "{{ inventory_hostname }}"
    username: admin
    password: switch

2. ale_aos_command

  • Short description: Send a command to an ALE OmniSwitch device.
  • Requirements: Netmiko version 2.4.2 or higher

Options:

  • host, port, username, password: Same as above.
  • command: The command to send (required).
  • search: String to look for in the output (optional).
  • timing: A boolean to use send_command_timing instead of send_command (default is false).

Example:

- ale_aos_command:
    host: "{{ inventory_hostname }}"
    username: admin
    password: switch
    command: show running-directory
    search: "Running Configuration    : SYNCHRONIZED"

3. ale_aos_config

  • Short description: Send configuration commands to an ALE OmniSwitch device.
  • Requirements: Netmiko version 2.4.2 or higher

Options:

  • host, port, username, password: Same as above.
  • file: Path to a file with configuration commands (optional).
  • commands: List of configuration commands to run (optional).
  • save: Boolean to save changes (default is false).
  • backup: Boolean to backup the configuration before changes (default is false).

Examples:

- ale_aos_config:
    host: "{{ inventory_hostname }}"
    username: admin
    password: switch
    commands:
      - vlan 100 enable name test1
      - vlan 200 enable name test2

- ale_aos_config:
    host: "{{ inventory_hostname }}"
    username: admin
    password: switch
    file: commands.txt

Tip: Use ansible-playbook myplaybook.yml --diff -v to see the changes made.

License

This project is licensed under the Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).

Author Information

Gilbert MOISIO, Senior Consultant in Network and Methodology.

Informazioni sul progetto

Ansible role to access OmniSwitch ALE devices

Installa
ansible-galaxy install gmoisio.ale_aos
Licenza
Unknown
Download
1.1k
Proprietario
Network & Methodology Senior Consultant / Full Stack Network Engineer