dellemc.openmanage.ome_user (9.1.0) — module

Create, modify or delete a user on OpenManage Enterprise

| "added in version" 2.0.0 of dellemc.openmanage"

Authors: Sajna Shetty(@Sajna-Shetty)

Install collection

Install with ansible-galaxy collection install dellemc.openmanage:==9.1.0


Add to requirements.yml

  collections:
    - name: dellemc.openmanage
      version: 9.1.0

Description

This module creates, modifies or deletes a user on OpenManage Enterprise.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
---
- name: Create user with required parameters
  dellemc.openmanage.ome_user:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    attributes:
      UserName: "user1"
      Password: "UserPassword"
      RoleId: "10"
      Enabled: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create user with all parameters
  dellemc.openmanage.ome_user:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    attributes:
      UserName: "user2"
      Description: "user2 description"
      Password: "UserPassword"
      RoleId: "10"
      Enabled: true
      DirectoryServiceId: 0
      UserTypeId: 1
      Locked: false
      Name: "user2"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Modify existing user
  dellemc.openmanage.ome_user:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    state: "present"
    attributes:
      UserName: "user3"
      RoleId: "10"
      Enabled: true
      Description: "Modify user Description"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete existing user using id
  dellemc.openmanage.ome_user:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    state: "absent"
    user_id: 1234
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete existing user using name
  dellemc.openmanage.ome_user:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    state: "absent"
    name: "name"

Inputs

    
name:
    description:
    - Unique Name of the user to be deleted.
    - Either I(user_id) or I(name) is mandatory for C(absent) operation.
    type: str

port:
    default: 443
    description: OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port.
    type: int

state:
    choices:
    - present
    - absent
    default: present
    description:
    - C(present) creates a user in case the I(UserName) provided inside I(attributes)
      does not exist.
    - C(present) modifies a user in case the I(UserName) provided inside I(attributes)
      exists.
    - C(absent) deletes an existing user.
    type: str

ca_path:
    description:
    - The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for
      the validation.
    type: path
    version_added: 5.0.0
    version_added_collection: dellemc.openmanage

timeout:
    default: 30
    description: The socket level timeout in seconds.
    type: int
    version_added: 5.0.0
    version_added_collection: dellemc.openmanage

user_id:
    description:
    - Unique ID of the user to be deleted.
    - Either I(user_id) or I(name) is mandatory for C(absent) operation.
    type: int

hostname:
    description: OpenManage Enterprise or OpenManage Enterprise Modular IP address or
      hostname.
    required: true
    type: str

password:
    description:
    - OpenManage Enterprise or OpenManage Enterprise Modular password.
    - If the password is not provided, then the environment variable C(OME_PASSWORD) is
      used.
    - 'Example: export OME_PASSWORD=password'
    required: true
    type: str

username:
    description:
    - OpenManage Enterprise or OpenManage Enterprise Modular username.
    - If the username is not provided, then the environment variable C(OME_USERNAME) is
      used.
    - 'Example: export OME_USERNAME=username'
    required: true
    type: str

attributes:
    default: {}
    description:
    - Payload data for the user operations. It can take the following attributes for C(present).
    - UserTypeId, DirectoryServiceId, Description, Name, Password, UserName, RoleId, Locked,
      Enabled.
    - OME will throw error if required parameter is not provided for operation.
    - Refer OpenManage Enterprise API Reference Guide for more details.
    type: dict

validate_certs:
    default: true
    description:
    - If C(false), the SSL certificates will not be validated.
    - Configure C(false) only on personally controlled sites where self-signed certificates
      are used.
    - Prior to collection version C(5.0.0), the I(validate_certs) is C(false) by default.
    type: bool
    version_added: 5.0.0
    version_added_collection: dellemc.openmanage

Outputs

msg:
  description: Overall status of the user operation.
  returned: always
  sample: Successfully created a User
  type: str
user_status:
  description: Details of the user operation, when I(state) is C(present).
  returned: When I(state) is C(present).
  sample:
    Description: Test user creation
    DirectoryServiceId: 0
    Enabled: true
    Id: '61546'
    IsBuiltin: false
    Locked: false
    Name: test
    Password: null
    PlainTextPassword: null
    RoleId: '10'
    UserName: test
    UserTypeId: 1
  type: dict