dellemc.openmanage.ome_user module – Create, modify or delete a user on OpenManage Enterprise
Note
This module is part of the dellemc.openmanage collection (version 9.8.0).
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 dellemc.openmanage
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: dellemc.openmanage.ome_user
.
New in dellemc.openmanage 2.0.0
Synopsis
This module creates, modifies or deletes a user on OpenManage Enterprise.
Requirements
The below requirements are needed on the host that executes this module.
python >= 3.9.6
Parameters
Parameter |
Comments |
---|---|
Payload data for the user operations. It can take the following attributes for 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. Default: |
|
The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. |
|
OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. |
|
Unique Name of the user to be deleted. Either user_id or name is mandatory for |
|
OpenManage Enterprise or OpenManage Enterprise Modular password. If the password is not provided, then the environment variable Example: export OME_PASSWORD=password |
|
OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. Default: |
|
Choices:
|
|
The socket level timeout in seconds. Default: |
|
Unique ID of the user to be deleted. Either user_id or name is mandatory for |
|
OpenManage Enterprise or OpenManage Enterprise Modular username. If the username is not provided, then the environment variable Example: export OME_USERNAME=username |
|
If Configure Prior to collection version Choices:
|
|
Authentication token. If the x_auth_token is not provided, then the environment variable Example: export OME_X_AUTH_TOKEN=x_auth_token |
Notes
Note
Run this module from a system that has direct access to Dell OpenManage Enterprise.
This module does not support
check_mode
.
Examples
---
- 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
- 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"
- 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"
- 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
- 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"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Overall status of the user operation. Returned: always Sample: |
|
Details of the user operation, when state is Returned: When state is Sample: |