Note
This plugin is part of the dellemc.openmanage collection (version 3.6.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
.
To use it in a playbook, specify: dellemc.openmanage.ome_user
.
New in version 2.0.0: of dellemc.openmanage
The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
attributes dictionary | Default: {} | Payload data for the user operations. It can take the following attributes for 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. |
hostname string / required | OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname. | |
name string | Unique Name of the user to be deleted. Either user_id or name is mandatory for absent operation. | |
password string / required | OpenManage Enterprise or OpenManage Enterprise Modular password. | |
port integer | Default: 443 | OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port. |
state string |
| present creates a user in case the UserName provided inside attributes does not exist.present modifies a user in case the UserName provided inside attributes exists.absent deletes an existing user. |
user_id integer | Unique ID of the user to be deleted. Either user_id or name is mandatory for absent operation. | |
username string / required | OpenManage Enterprise or OpenManage Enterprise Modular username. |
Note
check_mode
.--- - name: Create user with required parameters dellemc.openmanage.ome_user: hostname: "192.168.0.1" username: "username" password: "password" 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" 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" 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" state: "absent" user_id: 1234 - name: Delete existing user using name dellemc.openmanage.ome_user: hostname: "192.168.0.1" username: "username" password: "password" state: "absent" name: "name"
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
msg string | always | Overall status of the user operation. Sample: Successfully created a User |
user_status dictionary | When state is present . | Details of the user operation, when state is present .Sample: {'Description': 'Test user creation', 'DirectoryServiceId': 0, 'Enabled': True, 'Id': '61546', 'IsBuiltin': False, 'Locked': False, 'Name': 'test', 'Password': None, 'PlainTextPassword': None, 'RoleId': '10', 'UserName': 'test', 'UserTypeId': 1} |
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/dellemc/openmanage/ome_user_module.html