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_groups
.
New in version 3.5.0: of dellemc.openmanage
The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
description string | Description for the device group. This is applicable only when state is present . | |
group_id list / elements=integer | ID of the device group to be created, modified, or deleted. If state is absent, multiple IDs can be provided. This option is mutually exclusive with name. | |
hostname string / required | OpenManage Enterprise IP address or hostname. | |
name list / elements=string | Name of the device group to be created, modified, or deleted. If state is absent, multiple names can be provided. This option is case insensitive. This option is mutually exclusive with group_id. | |
new_name string | New name for the existing device group. This is applicable only when state is present . | |
parent_group_id integer | ID of the parent device group under which the device group to be created or modified. This is applicable only when state is present .This option is mutually exclusive with parent_group_name. | |
parent_group_name string | Default: "Static Groups" | Name of the parent device group under which the device group to be created or modified. This is applicable only when state is present .NOTE If device group with such a name does not exist, device group with parent_group_name is created.This option is case insensitive. This option is mutually exclusive with parent_group_id. |
password string / required | OpenManage Enterprise password. | |
port integer | Default: 443 | OpenManage Enterprise HTTPS port. |
state string |
| present allows to create or modify a device group.absent allows to delete a device group. |
username string / required | OpenManage Enterprise username. |
Note
check_mode
.--- - name: Create a new device group dellemc.openmanage.ome_groups: hostname: "192.168.0.1" username: "username" password: "password" name: "group 1" description: "Group 1 description" parent: "group parent 1" - name: Modify a device group using the group ID dellemc.openmanage.ome_groups: hostname: "192.168.0.1" username: "username" password: "password" group_id: 1234 description: "Group description updated" parent: "group parent 2" - name: Delete a device group using the device group name dellemc.openmanage.ome_groups: hostname: "192.168.0.1" username: "username" password: "password" state: absent name: "group 1" - name: Delete multiple device groups using the group IDs dellemc.openmanage.ome_groups: hostname: "192.168.0.1" username: "username" password: "password" state: absent group_id: - 1234 - 5678
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
error_info dictionary | on HTTP error | Details of the HTTP Error. Sample: {'error': {'@Message.ExtendedInfo': [{'Message': 'Unable to update group 12345 with the provided parent 54321 because a group/parent relationship already exists.', 'MessageArgs': ['12345', '54321'], 'MessageId': 'CGRP9013', 'RelatedProperties': [], 'Resolution': 'Make sure the entered parent ID does not create a bidirectional relationship and retry the operation.', 'Severity': 'Warning'}], 'code': 'Base.1.0.GeneralError', 'message': 'A general error has occurred. See ExtendedInfo for more information.'}} |
group_ids list / elements=integer | when state is absent
| List of the deleted device group IDs. Sample: [1234, 5678] |
group_status dictionary | success | Details of the device group operation status. Sample: {'CreatedBy': 'admin', 'CreationTime': '2021-01-01 10:10:10.100', 'DefinitionDescription': 'UserDefined', 'DefinitionId': 400, 'Description': 'my group description', 'GlobalStatus': 5000, 'HasAttributes': False, 'Id': 12123, 'IdOwner': 30, 'MembershipTypeId': 12, 'Name': 'group 1', 'ParentId': 12345, 'TypeId': 3000, 'UpdatedBy': '', 'UpdatedTime': '2021-01-01 11:11:10.100', 'Visible': True} |
invalid_groups list / elements=string | when state is absent
| List of the invalid device group IDs or names. Sample: [1234, 5678] |
msg string | always | Overall status of the device group operation. Sample: Successfully deleted the device group(s). |
© 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_groups_module.html