dellemc.openmanage.idrac_network_attributes 模块 – 配置 iDRAC 网络属性
注意
此模块是 dellemc.openmanage 集合 (版本 9.9.0) 的一部分。
如果您正在使用 ansible
包,则可能已安装此集合。它不包含在 ansible-core
中。要检查它是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用: ansible-galaxy collection install dellemc.openmanage
。您需要其他要求才能使用此模块,请参阅 要求 以了解详细信息。
要在 playbook 中使用它,请指定: dellemc.openmanage.idrac_network_attributes
。
dellemc.openmanage 8.4.0 中的新增功能
概要
此模块允许您配置网络接口卡上的端口和分区网络属性。
要求
执行此模块的主机需要以下要求。
python >= 3.9.6
参数
参数 |
注释 |
---|---|
network_attributes 和 oem_network_attributes 的应用时间。 这仅适用于 network_attributes 和 oem_network_attributes。
这对于 iDRAC8 不适用,该值将被忽略,并且对配置 oem_network_attributes 没有任何影响。 选项
|
|
包含用于验证的 CA 证书的隐私增强邮件 (PEM) 文件。 |
|
此参数允许您清除所有待处理的 OEM 网络属性更改。
对于 clear_pending 操作,将忽略 apply_time 值,并且不会产生任何影响。 此操作不支持 iDRAC8。 选项
|
|
iDRAC IP 地址。 |
|
iDRAC 用户密码。 如果未提供密码,则使用环境变量 示例:export IDRAC_PASSWORD=password |
|
iDRAC 端口。 默认: |
|
iDRAC 用户名。 如果未提供用户名,则使用环境变量 示例:export IDRAC_USERNAME=username |
|
提供等待作业完成的选项。 当 apply_time 为 oem_network_attributes 的 选项
|
|
job_wait 的最大等待时间(以秒为单位)。仅在此持续时间内跟踪作业。 当 job_wait 为 默认: |
|
此选项允许您安排维护窗口。 当 apply_time 为 |
|
维护窗口的持续时间(以秒为单位)。 |
|
要安排的维护窗口的开始时间。 格式为 YYYY-MM-DDThh:mm:ss<offset> <offset> 是 iDRAC 中设置的当前时区相对于 UTC 的时间偏移量,格式为:IST 为 +05:30。 |
|
网络适配器设备的 FQDD,表示能够连接到计算机网络的物理网络适配器。 网络适配器的 FQDD 示例为“NIC.Mezzanine.1A” |
|
网络属性和值的字典。要查看属性列表及其结构,请参见下面的 API https://I(idrac_ip/redfish/v1/Systems/System.Embedded.1/NetworkAdapters/<network_adapter_id>/NetworkDeviceFunctions/ <network_device_function_id>/Settings) 和 https://<idrac_ip>/redfish/v1/Schemas/NetworkDeviceFunction.v1_8_0.json。 network_attributes 与 oem_network_attributes 互斥。 |
|
表示网络适配器公开的逻辑接口的网络适配器设备功能的 FQDD。 网络适配器设备功能的 FQDD 示例为“NIC.Mezzanine.1A-1-1” |
|
这些属性必须是 Dell 集成远程访问控制器属性注册表的一部分。要查看 iDRAC9 及更高版本中属性注册表中的属性列表,请参见 https://I(idrac_ip/redfish/v1/Chassis/System.Embedded.1/NetworkAdapters/<network_adapter_id>/NetworkDeviceFunctions/ <network_device_function_id>/Oem/Dell/DellNetworkAttributes/<network_device_function_id>) 和 https://I(idrac_ip/redfish/v1/Registries/NetworkAttributesRegistry_<network_device_function_id>/ NetworkAttributesRegistry_network_port_id.json)。 对于基于 iDRAC8 的服务器,请从服务器配置配置文件中派生网络属性名称。 oem_network_attributes 与 network_attributes 互斥。 |
|
资源的 ID。 如果未提供资源 ID 的值,则模块将从 iDRAC 返回的系统资源列表中选择第一个可用的资源 ID。 |
|
以秒为单位的套接字级别超时。 默认值: |
|
如果为 仅在使用自签名证书的个人控制站点上配置 在收集版本 选项
|
|
身份验证令牌。 如果未提供 x_auth_token,则使用环境变量 示例:export IDRAC_X_AUTH_TOKEN=x_auth_token |
备注
注意
从此模块能够直接访问 Dell iDRAC 的系统运行此模块。
此模块支持 IPv4 和 IPv6 地址。
此模块支持
check_mode
。
示例
---
- name: Configure OEM network attributes
dellemc.openmanage.idrac_network_attributes:
idrac_ip: "192.168.0.1"
idrac_user: "user_name"
idrac_password: "user_password"
network_adapter_id: "NIC.Integrated.1"
network_device_function_id: "NIC.Integrated.1-1-1"
apply_time: "Immediate"
oem_network_attributes:
BannerMessageTimeout: "4"
- name: Configure OEM network attributes to apply on reset
dellemc.openmanage.idrac_network_attributes:
idrac_ip: "192.168.0.1"
idrac_user: "user_name"
idrac_password: "user_password"
network_adapter_id: NIC.Integrated.1
network_device_function_id: "NIC.Integrated.1-1-1"
oem_network_attributes:
BannerMessageTimeout: "4"
apply_time: OnReset
- name: Configure OEM network attributes to apply at maintainance window
dellemc.openmanage.idrac_network_attributes:
idrac_ip: "192.168.0.1"
idrac_user: "user_name"
idrac_password: "user_password"
network_adapter_id: NIC.Integrated.1
network_device_function_id: "NIC.Integrated.1-1-1"
oem_network_attributes:
BannerMessageTimeout: "4"
apply_time: AtMaintenanceWindowStart
maintenance_window:
start_time: "2022-09-30T05:15:40-05:00"
duration: 600
- name: Clearing the pending attributes
dellemc.openmanage.idrac_network_attributes:
idrac_ip: "192.168.0.1"
idrac_user: "user_name"
idrac_password: "user_password"
network_adapter_id: NIC.Integrated.1
network_device_function_id: "NIC.Integrated.1-1-1"
apply_time: "Immediate"
clear_pending: true
- name: Clearing the OEM pending attributes and apply the OEM network attributes
dellemc.openmanage.idrac_network_attributes:
idrac_ip: "192.168.0.1"
idrac_user: "user_name"
idrac_password: "user_password"
network_adapter_id: NIC.Integrated.1
network_device_function_id: "NIC.Integrated.1-1-1"
apply_time: "Immediate"
clear_pending: true
oem_network_attributes:
BannerMessageTimeout: "4"
- name: Configure OEM network attributes and wait for the job
dellemc.openmanage.idrac_network_attributes:
idrac_ip: "192.168.0.1"
idrac_user: "user_name"
idrac_password: "user_password"
network_adapter_id: NIC.Integrated.1
network_device_function_id: "NIC.Integrated.1-1-1"
apply_time: "Immediate"
oem_network_attributes:
LnkSpeed: "10MbpsHalf"
WakeOnLan: "Enabled"
VLanMode: "Enabled"
job_wait: true
job_wait_timeout: 2000
- name: Configure redfish network attributes to update fiber channel on reset
dellemc.openmanage.idrac_network_attributes:
idrac_ip: "192.168.0.1"
idrac_user: "user_name"
idrac_password: "user_password"
network_adapter_id: NIC.Integrated.1
network_device_function_id: "NIC.Integrated.1-1-1"
apply_time: OnReset
network_attributes:
Ethernet:
VLAN:
VLANEnable: true
- name: Configure redfish network attributes to apply on reset
dellemc.openmanage.idrac_network_attributes:
idrac_ip: "192.168.0.1"
idrac_user: "user_name"
idrac_password: "user_password"
network_adapter_id: NIC.Integrated.1
network_device_function_id: "NIC.Integrated.1-1-1"
network_attributes:
Ethernet:
VLAN:
VLANEnable: true
apply_time: OnReset
- name: Configure redfish network attributes of iscsi to apply at maintainance window start
dellemc.openmanage.idrac_network_attributes:
idrac_ip: "192.168.0.1"
idrac_user: "user_name"
idrac_password: "user_password"
network_adapter_id: NIC.Integrated.1
network_device_function_id: "NIC.Integrated.1-1-1"
network_attributes:
iSCSIBoot:
InitiatorIPAddress: 1.0.0.1
apply_time: AtMaintenanceWindowStart
maintenance_window:
start_time: "2022-09-30T05:15:40-05:00"
duration: 600
- name: Configure redfish network attributes to apply at maintainance window on reset
dellemc.openmanage.idrac_network_attributes:
idrac_ip: "192.168.0.1"
idrac_user: "user_name"
idrac_password: "user_password"
network_adapter_id: NIC.Integrated.1
network_device_function_id: "NIC.Integrated.1-1-1"
network_attributes:
Ethernet:
VLAN:
VLANEnable: false
VLANId: 1
apply_time: AtMaintenanceWindowStart
maintenance_window:
start_time: "2022-09-30T05:15:40-05:00"
duration: 600
返回值
常见的返回值已在 此处 记录,以下是此模块独有的字段
键 |
描述 |
---|---|
HTTP 错误的详细信息。 返回: HTTP 错误时 示例: |
|
无法应用的无效属性字典。 返回: 属性或值无效时 示例: |
|
返回作业状态的输出。 返回: 始终返回 示例: |
|
属性更新操作的状态。 返回: 应用网络属性时 示例: |