marcosmas28.o4n_ruggedcom_ros.o4n_ros_command (1.0.4) — module

Ansible module for executing commands in Ruggedcom ROS devices

| "added in version" 1.0.3 of marcosmas28.o4n_ruggedcom_ros"

Authors: Marcos Schonfeld (@marcosmas28)

Install collection

Install with ansible-galaxy collection install marcosmas28.o4n_ruggedcom_ros:==1.0.4


Add to requirements.yml

  collections:
    - name: marcosmas28.o4n_ruggedcom_ros
      version: 1.0.4

Description

Ansible module for executing commands in Ruggedcom ROS devices.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Execute the module with all options
- name: Running show product info
  o4n_ros_command:
    host: "{{ ansible_host }}"
    protocol: "{{ ansible_protocol }}"
    port: "{{ ansible_port }}"
    user: "{{ ansible_user }}"
    password: "{{ ansible_password }}"
    commands:
      - sql select Serial Number , Main Version from productinfo
      - sql select MAC Address , Order Code , Hardware ID from productinfo
  register: output

Inputs

    
host:
    description: Hostname or IP address of the Ruggedcom ROS device to connect to.
    required: true
    type: str

port:
    default: 22
    description: TCP port to use . (default 22)
    required: false
    type: int

user:
    description: User to login into the device
    required: true
    type: str

commands:
    description: List of commands to execute on the Ruggedcom OS device.
    required: true
    type: list

password:
    description: Password to login into the device
    required: true
    type: str

protocol:
    choices:
    - ssh
    - telnet
    default: ssh
    description: Protocol to be used
    required: false
    type: str

telnet_timeout:
    default: 10
    description: Number of seconds to wait for answers from the device.
    required: false
    type: int

Outputs

content:
  description: the commands output as a string.
  returned: always
  sample: "Serial Number                   Main Version                          \
    \          RUME924058381                   v4.1.0 (May 09 2014 16:39)        \
    \              n1 records selected\e[0m\e[2KMAC Address       Order Code     \
    \                                           Hardware ID                   94-B8-C5-F9-75-80\
    \ RS900-HI-D-L2-L2-00                                       RS900 (v2, 40-00-0066)\
    \        n1 records selected"
  type: str