W3cubDocs

/Ansible 2.11

wti.remote.cpm_interface_config – Set network interface parameters in WTI OOB and PDU devices

Note

This plugin is part of the wti.remote collection (version 1.0.1).

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

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

New in version 2.10: of wti.remote

Synopsis

  • Set network interface parameters in WTI OOB and PDU devices

Parameters

Parameter Choices/Defaults Comments
cpm_password
string / required
This is the Password of the WTI device to send the module.
cpm_url
string / required
This is the URL of the WTI device to send the module.
cpm_username
string / required
This is the Username of the WTI device to send the module.
interface
string
    Choices:
  • eth0
  • eth1
This is the ethernet port name that is getting configured.
ipv4address
string
IPv4 format IP address for the defined interface Port.
ipv4dhcpdefgateway
integer
    Choices:
  • 0
  • 1
Enable or Disable this ports configuration as the default IPv4 route for the device.
ipv4dhcpenable
integer
    Choices:
  • 0
  • 1
Enable IPv4 DHCP request call to obtain confufuration information.
ipv4dhcphostname
string
Define IPv4 DHCP Hostname.
ipv4dhcplease
integer
IPv4 DHCP Lease Time.
ipv4dhcpobdns
integer
    Choices:
  • 0
  • 1
IPv6 DHCP Obtain DNS addresses auto.
ipv4dhcpupdns
integer
    Choices:
  • 0
  • 1
IPv4 DHCP DNS Server Update.
ipv4gateway
string
IPv4 format Gateway address for the defined interface Port.
ipv4netmask
string
IPv4 format Netmask for the defined interface Port.
ipv6address
string
IPv6 format IP address for the defined interface Port.
ipv6gateway
string
IPv6 format Gateway address for the defined interface Port.
ipv6subnetprefix
string
IPv6 format Subnet Prefix for the defined interface Port.
negotiation
integer
    Choices:
  • 0
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
This is the speed of the interface port being configured.
0=Auto, 1=10/half, 2=10/full, 3=100/half, 4=100/full, 5=1000/half, 6=1000/full
use_https
boolean
    Choices:
  • no
  • yes
Designates to use an https connection or http connection.
use_proxy
boolean
    Choices:
  • no
  • yes
Flag to control if the lookup will observe HTTP proxy environment variables when present.
validate_certs
boolean
    Choices:
  • no
  • yes
If false, SSL certificates will not be validated. This should only be used
on personally controlled sites using self-signed certificates.

Notes

Note

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

Examples

# Set Network Interface Parameters
- name: Set the Interface Parameters for port eth1 of a WTI device
  cpm_interface_config:
    cpm_url: "nonexist.wti.com"
    cpm_username: "super"
    cpm_password: "super"
    use_https: true
    validate_certs: false
    interface: "eth1"
    ipv4address: "192.168.0.14"
    ipv4netmask: "255.255.255.0"
    ipv4gateway: "192.168.0.1"
    negotiation: 0

# Set Network Interface Parameters
- name: Set the Interface Parameters for port eth1 to DHCP of a WTI device
  cpm_interface_config:
    cpm_url: "nonexist.wti.com"
    cpm_username: "super"
    cpm_password: "super"
    use_https: true
    validate_certs: false
    interface: "eth1"
    negotiation: 0
    ipv4dhcpenable: 1
    ipv4dhcphostname: ""
    ipv4dhcplease: -1
    ipv4dhcpobdns: 0
    ipv4dhcpupdns: 0
    ipv4dhcpdefgateway: 0

Return Values

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

Key Returned Description
data
complex
always
The output JSON returned from the commands sent

interface
dictionary
always
Current k/v pairs of interface info for the WTI device after module execution.

Sample:
{'ietf-ipv4': {'address': [{'gateway': '', 'ip': '10.10.10.2', 'netmask': '255.255.255.0'}], 'dhcpclient': [{'enable': 0, 'hostname': '', 'lease': -1, 'obdns': 1, 'updns': 1}]}, 'ietf-ipv6': {'address': [{'gateway': '', 'ip': '', 'netmask': ''}]}, 'is_gig': '1', 'is_up': '0', 'mac_address': '00-09-9b-02-45-db', 'name': 'eth1', 'negotiation': '0', 'speed': '10', 'type': '0'}
totalports
integer
success
Total interface ports requested of the WTI device.

Sample:
1


Authors

  • Western Telematic Inc. (@wtinetworkgear)

© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/wti/remote/cpm_interface_config_module.html