kembitnl.pmp.account (1.1.6) — module

Create, update or delete an account

Authors: KEMBIT Automation team (ansible@kembit.nl)

Install collection

Install with ansible-galaxy collection install kembitnl.pmp:==1.1.6


Add to requirements.yml

  collections:
    - name: kembitnl.pmp
      version: 1.1.6

Description

Create, update or delete an account.

The PMP URL and authtoken must be set in environment variables PMP_URL and PMP_AUTHTOKEN.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Retrieve all resources shared to an API account
- name: Create or update an account
  kembitnl.pmp.account:
    resourcename: 'Azure Accounts'
    organization: CUSTOMER
    account: Customeradmin@customerdomain.com
    state: present
    arguments:
        password: MySecretPassw0rd
        resetreason: Resetting the password
        resettype: local
        addnotes: Add these notes
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete an account
  kembitnl.pmp.account:
    resourcename: 'Myresource'
    account: 'Testaccount'
    state: absent

Inputs

    
state:
    choices:
    - present
    - absent
    default: null
    description: Describes whether the account should be present or not
    required: true
    type: str

orgName:
    aliases:
    - organization
    description: The name of the organization. If omitted, the default organization will
      be used.
    required: false
    type: str

arguments:
    default: null
    description: Describes the arguments needed. Required when state == present. For new
      accounts, password must be present.
    required: false
    suboptions:
      addnotes:
        default: null
        description:
        - The notes for the account. Already present notes will not be overwritten, the
          new notes will be added at the end.
        - Mutually exclusive with I(notes)
        required: false
        type: str
      newname:
        default: null
        description:
        - New name for an existing account.
        - Ignored when creating a new account.
        required: false
        type: str
      notes:
        default: null
        description:
        - The notes for the account. Already present notes will be overwritten.
        - Mutually exclusive with I(addnotes)
        required: false
        type: str
      password:
        default: null
        description:
        - The password of the resource. When present the password will be reset.
        - When the account already exists, both I(resetreason) and I(resettype) are required.
        required: false
        type: str
      passwordpolicy:
        default: null
        description:
        - The password policy for the account, only needed when it differs from the default
          password policy of the resource.
        required: false
        type: str
      resetreason:
        default: null
        description:
        - The reason for the password reset.
        - Required when I(password) is present and account already exists. Ignored when
          creating a new account.
        required: false
        type: str
      resettype:
        choices:
        - local
        - remote
        default: null
        description:
        - The type for the password reset.
        - Required when I(password) is present and account already exists. Ignored when
          creating a new account.
        required: false
        type: str
    type: dict

accountname:
    default: null
    description: The name of the account
    required: true
    type: str

resourcename:
    default: null
    description: The name of the resource.
    required: true
    type: str

Outputs

account:
  description: Returns the result of the call
  returned: on success
  sample:
    message: Account data succesfully updated, password successfully updated
  type: dict