gmoisio.ale.ale_aos_command (1.2.0) — module

Send a command to an ALE OmniSwitch device.

| "added in version" 1.2.0 of gmoisio.ale"

Authors: Gilbert MOISIO

stableinterface | supported by community

Install collection

Install with ansible-galaxy collection install gmoisio.ale:==1.2.0


Add to requirements.yml

  collections:
    - name: gmoisio.ale
      version: 1.2.0

Description

Connect to an OmniSwitch device and send a command. It can search for a string.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- gmoisio.ale.ale_aos_command: 
    host: "{{ ansible_host }}"
    username: admin
    password: switch
    sshconf: ~/.ssh/config
    command: show running-directory
    search: "Running Configuration    : SYNCHRONIZED"

Inputs

    
host:
    description:
    - Set to {{ inventory_hostname }} or {{ ansible_host }}
    required: true

port:
    default: 22
    description:
    - SSH connection port
    required: false

search:
    default: ''
    description:
    - String to search in the output of the command to validate the proper execution
    required: false

timing:
    default: false
    description:
    - Boolean to run send_command_timing instead of send_command
    required: false

command:
    description:
    - Command to send to the device
    required: true

sshconf:
    default: None
    description:
    - Path to sshconfig to use for connections
    required: false

password:
    description:
    - Login password
    required: true

username:
    description:
    - Login username
    required: true

Outputs

msg:
  description: Error message
  returned: On fail
  type: string
output:
  description: Output returned by the command
  returned: On exit and on fail if the search string is not found
  type: string