wti.remote.cpm_user (1.0.5) — module

Get various status and parameters from WTI OOB and PDU devices

| "added in version" 2.7.0 of wti.remote"

Authors: Western Telematic Inc. (@wtinetworkgear)

preview | supported by community

Install collection

Install with ansible-galaxy collection install wti.remote:==1.0.5


Add to requirements.yml

  collections:
    - name: wti.remote
      version: 1.0.5

Description

Get/Add/Edit Delete Users from WTI OOB and PDU devices

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Get User Parameters
- name: Get the User Parameters for the given user of a WTI device
  cpm_user:
    cpm_action: "getuser"
    cpm_url: "rest.wti.com"
    cpm_username: "restuser"
    cpm_password: "restfuluserpass12"
    use_https: true
    validate_certs: true
    user_name: "usernumberone"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Create User
- name: Create a User on a given WTI device
  cpm_user:
    cpm_action: "adduser"
    cpm_url: "rest.wti.com"
    cpm_username: "restuser"
    cpm_password: "restfuluserpass12"
    use_https: true
    validate_certs: false
    user_name: "usernumberone"
    user_pass: "complicatedpassword"
    user_accesslevel: 2
    user_accessssh: 1
    user_accessserial: 1
    user_accessweb: 0
    user_accessapi: 1
    user_accessmonitor: 0
    user_accessoutbound: 0
    user_portaccess: "10011111"
    user_plugaccess: "00000111"
    user_groupaccess: "00000000"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Edit User
- name: Edit a User on a given WTI device
  cpm_user:
    cpm_action: "edituser"
    cpm_url: "rest.wti.com"
    cpm_username: "restuser"
    cpm_password: "restfuluserpass12"
    use_https: true
    validate_certs: false
    user_name: "usernumberone"
    user_pass: "newpasswordcomplicatedpassword"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Delete User
- name: Delete a User from a given WTI device
  cpm_user:
    cpm_action: "deleteuser"
    cpm_url: "rest.wti.com"
    cpm_username: "restuser"
    cpm_password: "restfuluserpass12"
    use_https: true
    validate_certs: true
    user_name: "usernumberone"

Inputs

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

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

user_name:
    description:
    - This is the User Name that needs to be create/modified/deleted
    required: true
    type: str

user_pass:
    description:
    - This is the User Password that needs to be create/modified/deleted
    - If the user is being Created this parameter is required
    required: false
    type: str

cpm_action:
    choices:
    - getuser
    - adduser
    - edituser
    - deleteuser
    description:
    - This is the Action to send the module.
    required: true
    type: str

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

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

user_accessapi:
    choices:
    - 0
    - 1
    description:
    - If the user has access to the WTI device via RESTful APIs
    - 0 No , 1 Yes
    required: false
    type: int

user_accessssh:
    choices:
    - 0
    - 1
    description:
    - If the user has access to the WTI device via SSH
    - 0 No , 1 Yes
    required: false
    type: int

user_accessweb:
    choices:
    - 0
    - 1
    description:
    - If the user has access to the WTI device via Web
    - 0 No , 1 Yes
    required: false
    type: int

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

user_plugaccess:
    description:
    - If AccessLevel is lower than Administrator, which plugs the user has access
    required: false
    type: str

user_portaccess:
    description:
    - If AccessLevel is lower than Administrator, which ports the user has access
    required: false
    type: str

user_accesslevel:
    choices:
    - 0
    - 1
    - 2
    - 3
    description:
    - This is the access level that needs to be create/modified/deleted
    - 0 View, 1 User, 2 SuperUser, 3 Administrator
    required: false
    type: int

user_groupaccess:
    description:
    - If AccessLevel is lower than Administrator, which Groups the user has access
    required: false
    type: str

user_accessserial:
    choices:
    - 0
    - 1
    description:
    - If the user has access to the WTI device via Serial ports
    - 0 No , 1 Yes
    required: false
    type: int

user_accessmonitor:
    choices:
    - 0
    - 1
    description:
    - If the user has ability to monitor connection sessions
    - 0 No , 1 Yes
    required: false
    type: int

user_callbackphone:
    description:
    - This is the Call Back phone number used for POTS modem connections
    required: false
    type: str

user_accessoutbound:
    choices:
    - 0
    - 1
    description:
    - If the user has ability to initiate Outbound connection
    - 0 No , 1 Yes
    required: false
    type: int

Outputs

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