wti.remote.cpm_web_config module – Set network WEB parameters in WTI OOB and PDU devices

Note

This module is part of the wti.remote collection (version 1.0.10).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install wti.remote.

To use it in a playbook, specify: wti.remote.cpm_web_config.

New in wti.remote 2.10.0

Synopsis

  • Set network WEB parameters in WTI OOB and PDU devices

Parameters

Parameter

Comments

cpm_password

string / required

This is the Password of the WTI device to send the module. If the

cpm_username is blank, this parameter is presumed to be a User Token.

cpm_url

string / required

This is the URL of the WTI device to send the module.

cpm_username

string

This is the Username of the WTI device to send the module. If this value

is blank, then the cpm_password is presumed to be a User Token.

harden

integer

Security level for the WEB the device will respond to 0 = Off, 1 = Medium, 2 = High.

Choices:

  • 0

  • 1

  • 2

hsts

integer

If HTTP Strict Transport Security (HSTS) is enabled/disabled for the WEB.

Choices:

  • 0

  • 1

httpenable

integer

Activates unsecure WEB for the specified interface.

Choices:

  • 0

  • 1

httpport

integer

Port used by the insecure WEB.

httpsenable

integer

Activates secure WEB for the specified interface.

Choices:

  • 0

  • 1

httpsport

integer

Port used by the secure WEB.

inter_filename

string

Intermediate Certificate to be assigned to the Device.

interface

string / required

The ethernet port for the SNMP we are defining.

Choices:

  • "eth0"

  • "eth1"

  • "ppp0"

  • "qmimux0"

ocsp

integer

Current state of the Online Certificate Status Protocol (OCSP) for the Web Server.

Choices:

  • 0

  • 1

private_filename

string

Private Certificate to be assigned to the Device.

signed_filename

string

Signed Certificate to be assigned to the Device.

timeout

integer

Inactivity timeout of a user when logged into the web server (valid from 0 to 9999 minutes) 0 is no timeout.

tlsmode

integer

Which TLS the WEB will use 0 = TLSv1.1, 1 = TLSv1.1/TLSv1.2, 2 = TLSv1.2/TLSv1.3, 3 = TLSv1.3

Choices:

  • 0

  • 1

  • 2

  • 3

trace

integer

Current state of TRACE requests for thw Web Server.

Choices:

  • 0

  • 1

use_https

boolean

Designates to use an https connection or http connection.

Choices:

  • false

  • true ← (default)

use_proxy

boolean

Flag to control if the lookup will observe HTTP proxy environment variables when present.

Choices:

  • false ← (default)

  • true

validate_certs

boolean

If false, SSL certificates will not be validated. This should only be used

on personally controlled sites using self-signed certificates.

Choices:

  • false

  • true ← (default)

webterm

integer

Current state of the CLI over Web for the Web Server.

Choices:

  • 0

  • 1

Notes

Note

  • Use groups/cpm in module_defaults to set common options used between CPM modules.

Examples

# Sets the device WEB Parameters
- name: Set the an WEB Parameter for a WTI device
  cpm_snmp_config:
    cpm_url: "nonexist.wti.com"
    cpm_username: "super"
    cpm_password: "super"
    interface: "eth0"
    use_https: true
    validate_certs: false
    private_filename: "/tmp/private.key"
    signed_filename: "/tmp/signed.key"
    inter_filename: "/tmp/intermediate.key"

# Sets the device WEB Parameters using a User Token
- name: Set the an WEB Parameter for a WTI device
  cpm_snmp_config:
    cpm_url: "nonexist.wti.com"
    cpm_username: ""
    cpm_password: "randomusertokenfromthewtidevice"
    interface: "eth0"
    use_https: true
    validate_certs: false

# Sets the device WEB Parameters
- name: Set the WEB Parameters a WTI device
  cpm_snmp_config:
    cpm_url: "nonexist.wti.com"
    cpm_username: "super"
    cpm_password: "super"
    use_https: true
    validate_certs: false

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

data

complex

The output JSON returned from the commands sent

Returned: always

ocsp

integer

Current state of the Online Certificate Status Protocol (OCSP) for the Web Server.

Returned: success

Sample: 1

timeout

integer

Inactivity timeout of a user. (valid from 0 to 9999 minutes) 0 is no timeout.

Returned: success

Sample: 0

totalports

integer

Total port being returned from the current call.

Returned: success

Sample: 1

trace

integer

Current state of TRACE requests for the Web Server.

Returned: success

Sample: 0

web

dictionary

Current k/v pairs of Web info for the WTI device after module execution.

Returned: always

Sample: [{"harden": "2", "hsts": "0", "httpenable": "1", "httpport": "80", "httpsenable": "1", "httpsport": "443", "name": "eth0", "tlsmode": "2"}]

webterm

integer

Current state of the CLI over Web for the Web Server.

Returned: success

Sample: 0

Authors

  • Western Telematic Inc. (@wtinetworkgear)