dellemc.openmanage.ome_device_group module – Add or remove device(s) from a static device group 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_device_group
.
New in dellemc.openmanage 3.3.0
Synopsis
This module allows to add or remove device(s) from a static device group on OpenManage Enterprise.
Requirements
The below requirements are needed on the host that executes this module.
python >= 3.9.6
netaddr >= 0.7.19
Parameters
Parameter |
Comments |
---|---|
The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. |
|
List of ID(s) of the device(s) to be added or removed from the device group. device_ids is mutually exclusive with device_service_tags and ip_addresses. |
|
List of service tag(s) of the device(s) to be added or removed from the device group. device_service_tags is mutually exclusive with device_ids and ip_addresses. |
|
ID of the static device. group_id is mutually exclusive with name. |
|
OpenManage Enterprise IP address or hostname. |
|
List of IPs of the device(s) to be added or removed from the device group. ip_addresses is mutually exclusive with device_ids and device_service_tags. Supported IP address range formats:
|
|
Name of the static group. name is mutually exclusive with group_id. |
|
OpenManage Enterprise password. If the password is not provided, then the environment variable Example: export OME_PASSWORD=password |
|
OpenManage Enterprise HTTPS port. Default: |
|
Choices:
|
|
The socket level timeout in seconds. Default: |
|
OpenManage Enterprise 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 supports
check_mode
.
Examples
---
- name: Add devices to a static device group by using the group name and device IDs
dellemc.openmanage.ome_device_group:
hostname: "192.168.0.1"
username: "username"
password: "password"
ca_path: "/path/to/ca_cert.pem"
name: "Storage Services"
device_ids:
- 11111
- 11112
- 11113
- name: Add devices to a static device group by using the group name and device service tags
dellemc.openmanage.ome_device_group:
hostname: "192.168.0.1"
username: "username"
password: "password"
ca_path: "/path/to/ca_cert.pem"
name: "Storage Services"
device_service_tags:
- GHRT2RL
- KJHDF3S
- LKIJNG6
- name: Add devices to a static device group by using the group ID and device service tags
dellemc.openmanage.ome_device_group:
hostname: "192.168.0.1"
username: "username"
password: "password"
ca_path: "/path/to/ca_cert.pem"
group_id: 12345
device_service_tags:
- GHRT2RL
- KJHDF3S
- name: Add devices to a static device group by using the group name and IPv4 addresses
dellemc.openmanage.ome_device_group:
hostname: "192.168.0.1"
username: "username"
password: "password"
ca_path: "/path/to/ca_cert.pem"
name: "Storage Services"
ip_addresses:
- 192.35.0.1
- 192.35.0.5
- name: Add devices to a static device group by using the group ID and IPv6 addresses
dellemc.openmanage.ome_device_group:
hostname: "192.168.0.1"
username: "username"
password: "password"
ca_path: "/path/to/ca_cert.pem"
group_id: 12345
ip_addresses:
- fe80::ffff:ffff:ffff:ffff
- fe80::ffff:ffff:ffff:2222
- name: Add devices to a static device group by using the group ID and supported IPv4 and IPv6 address formats.
dellemc.openmanage.ome_device_group:
hostname: "192.168.0.1"
username: "username"
password: "password"
ca_path: "/path/to/ca_cert.pem"
group_id: 12345
ip_addresses:
- 192.35.0.1
- 10.36.0.0-192.36.0.255
- 192.37.0.0/24
- fe80::ffff:ffff:ffff:ffff
- ::ffff:192.0.2.0/125
- fe80::ffff:ffff:ffff:1111-fe80::ffff:ffff:ffff:ffff
- name: Remove devices from a static device group by using the group name and device IDs
dellemc.openmanage.ome_device_group:
hostname: "192.168.0.1"
username: "username"
password: "password"
ca_path: "/path/to/ca_cert.pem"
state: "absent"
name: "Storage Services"
device_ids:
- 11111
- 11112
- 11113
- name: Remove devices from a static device group by using the group name and device service tags
dellemc.openmanage.ome_device_group:
hostname: "192.168.0.1"
username: "username"
password: "password"
ca_path: "/path/to/ca_cert.pem"
state: "absent"
name: "Storage Services"
device_service_tags:
- GHRT2RL
- KJHDF3S
- LKIJNG6
- name: Remove devices from a static device group by using the group ID and device service tags
dellemc.openmanage.ome_device_group:
hostname: "192.168.0.1"
username: "username"
password: "password"
ca_path: "/path/to/ca_cert.pem"
state: "absent"
group_id: 12345
device_service_tags:
- GHRT2RL
- KJHDF3S
- name: Remove devices from a static device group by using the group name and IPv4 addresses
dellemc.openmanage.ome_device_group:
hostname: "192.168.0.1"
username: "username"
password: "password"
ca_path: "/path/to/ca_cert.pem"
state: "absent"
name: "Storage Services"
ip_addresses:
- 192.35.0.1
- 192.35.0.5
- name: Remove devices from a static device group by using the group ID and IPv6 addresses
dellemc.openmanage.ome_device_group:
hostname: "192.168.0.1"
username: "username"
password: "password"
ca_path: "/path/to/ca_cert.pem"
state: "absent"
group_id: 12345
ip_addresses:
- fe80::ffff:ffff:ffff:ffff
- fe80::ffff:ffff:ffff:2222
- name: Remove devices from a static device group by using the group ID and supported IPv4 and IPv6 address formats.
dellemc.openmanage.ome_device_group:
hostname: "192.168.0.1"
username: "username"
password: "password"
ca_path: "/path/to/ca_cert.pem"
state: "absent"
group_id: 12345
ip_addresses:
- 192.35.0.1
- 10.36.0.0-192.36.0.255
- 192.37.0.0/24
- fe80::ffff:ffff:ffff:ffff
- ::ffff:192.0.2.0/125
- fe80::ffff:ffff:ffff:1111-fe80::ffff:ffff:ffff:ffff
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Details of the HTTP Error. Returned: on HTTP error Sample: |
|
ID of the group. Returned: success Sample: |
|
IP Addresses which are added to the device group. Returned: success Sample: |
|
Overall status of the device group settings. Returned: always Sample: |