ansible.builtin.cpm_serial_port_config (v2.9.27) — module

Set Serial port parameters in WTI OOB and PDU devices

| "added in version" 2.9 of ansible.builtin"

Authors: Western Telematic Inc. (@wtinetworkgear)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.9.27

Description

Set Serial port parameters in WTI OOB and PDU devices

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Set Serial Port Parameters
- name: Set the Port Parameters for port 2 of a WTI device
  cpm_serial_port_config:
    cpm_url: "nonexist.wti.com"
    cpm_username: "super"
    cpm_password: "super"
    use_https: true
    validate_certs: false
    port: "2"
    portname: "RouterLabel"
    baud: "7"
    handshake: "1"
    stopbits: "0"
    parity: "0"
    mode: "0"
    cmd: "0"
    seq: "1"
    tout: "1"
    echo: "0"
    break_allow: "0"
    logoff: "^H"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Set Serial Port Port Name and Baud Rate Parameters
- name: Set New port name and baud rate (115k) for port 4 of a WTI device
  cpm_serial_port_config:
    cpm_url: "nonexist.wti.com"
    cpm_username: "super"
    cpm_password: "super"
    use_https: true
    validate_certs: false
    port: "4"
    portname: "NewPortName1"
    baud: "8"

Inputs

    
cmd:
    choices:
    - 0
    - 1
    description:
    - This is the Admin Mode to assign to the port, 0=Deny, 1=Permit.
    required: false

seq:
    choices:
    - 1
    - 2
    - 3
    description:
    - This is the type of Sequence Disconnect to assign to the port, 0=Three Characters
      (before and after), 1=One Character Only, 2=Off
    required: false

baud:
    choices:
    - 0
    - 1
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8
    - 9
    - 10
    description:
    - This is the baud rate to assign to the port.
    - 0=300, 1=1200, 2=2400, 3=4800, 4=9600, 5=19200, 6=38400, 7=57600, 8=115200, 9=230400,
      10=460800
    required: false

echo:
    description: -This is the command echo parameter to assign to the port, 0=Off, 1=On
    required: false

mode:
    choices:
    - 0
    - 1
    - 2
    - 3
    - 4
    description:
    - This is the port mode to assign to the port, 0=Any-to-Any. 1=Passive, 2=Buffer,
      3=Modem, 4=ModemPPP.
    required: false

port:
    description:
    - This is the port number that is getting the action performed on.
    required: true
    type: int

tout:
    choices:
    - 0
    - 1
    - 2
    - 3
    - 4
    - 5
    description:
    - This is the Port Activity Timeout to assign to the port, 0=Off, 1=5 Min, 2=15 Min,
      3=30 Min, 4=90 Min, 5=1 Min.
    required: false

logoff:
    description:
    - This is the logout character to assign to the port
    - If preceded by a ^ character, the sequence will be a control character. Used if
      seq is set to 0 or 1
    required: false

parity:
    choices:
    - 0
    - 1
    - 2
    - 3
    - 4
    - 5
    description:
    - This is the parity to assign to the port, 0=7-None, 1=7-Even, 2=7-Odd, 3=8-None,
      4=8-Even, 5=8-Odd.
    required: false

cpm_url:
    description:
    - This is the URL of the WTI device to send the module.
    required: true

portname:
    description:
    - This is the Name of the Port that is displayed.
    required: false

stopbits:
    choices:
    - 0
    - 1
    description:
    - This is the stop bits to assign to the port, 0=1 Stop Bit, 1=2 Stop Bit.
    required: false

handshake:
    choices:
    - 0
    - 1
    - 2
    - 3
    description:
    - This is the handshake to assign to the port, 0=None, 1=XON/XOFF, 2=RTS/CTS, 3=Both.
    required: false

use_https:
    default: true
    description:
    - Designates to use an https connection or http connection.
    required: false
    type: bool

use_proxy:
    default: false
    description: Flag to control if the lookup will observe HTTP proxy environment variables
      when present.
    required: false
    type: bool

break_allow:
    description:
    - This is if the break character is allowed to be passed through the port, 0=Off,
      1=On
    required: false

cpm_password:
    description:
    - This is the Password of the WTI device to send the module.
    required: true

cpm_username:
    description:
    - This is the Username of the WTI device to send the module.
    required: true

validate_certs:
    default: true
    description:
    - If false, SSL certificates will not be validated. This should only be used
    - on personally controlled sites using self-signed certificates.
    required: false
    type: bool

Outputs

data:
  description: The output JSON returned from the commands sent
  returned: always
  type: str