dellemc.openmanage.ome_device_group 模块 – 在 OpenManage Enterprise 上向静态设备组添加或移除设备
注意
此模块是 dellemc.openmanage 集合 (版本 9.9.0) 的一部分。
如果您使用的是 ansible
包,则可能已经安装了此集合。它不包含在 ansible-core
中。要检查是否已安装它,请运行 ansible-galaxy collection list
。
要安装它,请使用:ansible-galaxy collection install dellemc.openmanage
。您需要其他要求才能使用此模块,请参阅 要求 以了解详情。
要在 playbook 中使用它,请指定:dellemc.openmanage.ome_device_group
。
dellemc.openmanage 3.3.0 中的新增功能
概要
此模块允许向 OpenManage Enterprise 上的静态设备组添加或移除设备。
要求
执行此模块的主机需要以下要求。
python >= 3.9.6
netaddr >= 0.7.19
参数
参数 |
注释 |
---|---|
包含用于验证的 CA 证书的隐私增强邮件 (PEM) 文件。 |
|
要添加到设备组或从设备组移除的设备的 ID 列表。 device_ids 与 device_service_tags 和 ip_addresses 互斥。 |
|
要添加到设备组或从设备组移除的设备的服务标签列表。 device_service_tags 与 device_ids 和 ip_addresses 互斥。 |
|
静态设备的 ID。 group_id 与 name 互斥。 |
|
OpenManage Enterprise IP 地址或主机名。 |
|
要添加到设备组或从设备组移除的设备的 IP 列表。 ip_addresses 与 device_ids 和 device_service_tags 互斥。 支持的 IP 地址范围格式
|
|
静态组的名称。 name 与 group_id 互斥。 |
|
OpenManage Enterprise HTTPS 端口。 默认值: |
|
选项
|
|
以秒为单位的套接字级别超时。 默认值: |
|
如果为 仅在使用自签名证书的个人控制站点上配置 在集合版本 选项
|
|
身份验证令牌。 如果未提供 x_auth_token,则使用环境变量 示例:export OME_X_AUTH_TOKEN=x_auth_token |
备注
注意
从可以直接访问 Dell OpenManage Enterprise 的系统运行此模块。
此模块支持
check_mode
。
示例
---
- 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
返回值
常见的返回值已在此处记录,以下是此模块独有的字段
键 |
描述 |
---|---|
HTTP 错误的详细信息。 返回:HTTP 错误时 示例: |
|
组的ID。 返回:成功 示例: |
|
添加到设备组的IP地址。 返回:成功 示例: |
|
设备组设置的整体状态。 返回:始终 示例: |