dellemc.openmanage.ome_device_quick_deploy 模块 – 在 OpenManage Enterprise Modular 上配置快速部署设置。

注意

此模块是 dellemc.openmanage 集合 (版本 9.9.0) 的一部分。

如果您使用的是 ansible 包,则可能已经安装了此集合。它不包含在 ansible-core 中。要检查是否已安装它,请运行 ansible-galaxy collection list

要安装它,请使用: ansible-galaxy collection install dellemc.openmanage。您需要满足其他要求才能使用此模块,有关详细信息,请参阅 要求

要在 playbook 中使用它,请指定: dellemc.openmanage.ome_device_quick_deploy

dellemc.openmanage 5.0.0 中的新增功能

概要

  • 此模块允许配置 OpenManage Enterprise Modular 上服务器或 IOM 的快速部署设置。

要求

执行此模块的主机需要以下要求。

  • python >= 3.9.6

参数

参数

注释

ca_path

路径

dellemc.openmanage 5.0.0 中新增

包含用于验证的 CA 证书的隐私增强邮件 (PEM) 文件。

device_id

整数

要为其部署快速部署设置的机箱 ID。

如果未指定设备 ID,则此模块会更新主机名的快速部署设置。

device_iddevice_service_tag 互斥。

device_service_tag

字符串

要为其部署快速部署设置的机箱服务标签。

如果未指定设备服务标签,则此模块会更新主机名的快速部署设置。

device_service_tagdevice_id 互斥。

hostname

字符串 / 必需

OpenManage Enterprise Modular 的 IP 地址或主机名。

job_wait

布尔值

确定是否等待作业完成。

选项

  • false

  • true ← (默认)

job_wait_timeout

整数

job_wait 的最大等待时间(秒)。仅在此持续时间内跟踪作业。

job_waittrue 时,此选项适用。

默认值: 120

password

字符串

OpenManage Enterprise Modular 密码。

如果未提供密码,则使用环境变量 OME_PASSWORD

示例:export OME_PASSWORD=password

port

整数

OpenManage Enterprise Modular HTTPS 端口。

默认值: 443

quick_deploy_options

字典 / 必需

服务器和 IOM 快速部署的快速部署设置。

ipv4_enabled

布尔值

启用或禁用 IPv4 网络。

选项

  • false

  • true

ipv4_gateway

字符串

IPv4 网关。

如果 ipv4_network_typeStatic,则需要 ipv4_gateway

ipv4_network_type

字符串

IPv4 网络类型。

如果 ipv4_enabledtrue,则需要 ipv4_network_type

Static 用于配置静态 IP 设置。

DHCP 用于配置动态 IP 设置。

选项

  • "Static"

  • "DHCP"

ipv4_subnet_mask

字符串

IPv4 子网掩码。

如果 ipv4_network_typeStatic,则需要 ipv4_subnet_mask

ipv6_enabled

布尔值

启用或禁用 IPv6 网络。

选项

  • false

  • true

ipv6_gateway

字符串

IPv6 网关。

如果 ipv6_network_typeStatic,则需要 ipv6_gateway

ipv6_network_type

字符串

IPv6 网络类型。

如果 ipv6_enabledtrue,则需要 ipv6_network_type

Static 用于配置静态 IP 设置。

DHCP 用于配置动态 IP 设置。

选项

  • "Static"

  • "DHCP"

ipv6_prefix_length

整数

IPV6 前缀长度。

如果 ipv6_network_typeStatic,则需要 ipv6_prefix_length

password

字符串

登录服务器或 IOM 的密码。

添加password选项时,模块将始终报告更改。

slots

列表 / 元素=字典

服务器或 IOM 的插槽配置。

slot_id

整数 / 必需

插槽 ID。

slot_ipv4_address

字符串

插槽的 IPv4 地址。

slot_ipv6_address

字符串

插槽的 IPv6 地址。

vlan_id

整数

VLAN ID。

setting_type

字符串 / 必需

要应用的快速部署设置的类型。

应用服务器快速部署设置的ServerQuickDeploy

应用IOM快速部署设置的IOMQuickDeploy

选项

  • "ServerQuickDeploy"

  • "IOMQuickDeploy"

超时时间

整数

dellemc.openmanage 5.0.0 中新增

以秒为单位的套接字级别超时时间。

默认值: 30

用户名

字符串

OpenManage Enterprise Modular用户名。

如果未提供用户名,则使用环境变量OME_USERNAME

示例:export OME_USERNAME=username

验证证书

布尔值

dellemc.openmanage 5.0.0 中新增

如果为false,则不会验证SSL证书。

仅在使用自签名证书的个人控制站点上配置false

在集合版本5.0.0之前,validate_certs默认为false

选项

  • false

  • true ← (默认)

x_auth_token

字符串

在dellemc.openmanage 9.3.0中添加

身份验证令牌。

如果未提供x_auth_token,则使用环境变量OME_X_AUTH_TOKEN

示例:export OME_X_AUTH_TOKEN=x_auth_token

注释

注意

  • 从可以直接访问OpenManage Enterprise Modular的系统运行此模块。

  • 此模块支持check_mode

  • 添加password选项时,模块将始终报告更改。

  • 如果机箱是多机箱组的成员,并且被指定为备份引导机箱,则使用此模块对机箱执行的操作可能会与通过引导机箱对机箱执行的管理操作冲突。

示例

---
- name: Configure server Quick Deploy settings of the chassis using device ID.
  dellemc.openmanage.ome_device_quick_deploy:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    device_id: 25011
    setting_type: ServerQuickDeploy
    ca_path: "/path/to/ca_cert.pem"
    quick_deploy_options:
      password: "password"
      ipv4_enabled: true
      ipv4_network_type: Static
      ipv4_subnet_mask: 255.255.255.0
      ipv4_gateway: 192.168.0.1
      ipv6_enabled: true
      ipv6_network_type: Static
      ipv6_prefix_length: 1
      ipv6_gateway: "::"
      slots:
        - slot_id: 1
          slot_ipv4_address: 192.168.0.2
          slot_ipv6_address: "::"
          vlan_id: 1
        - slot_id: 2
          slot_ipv4_address: 192.168.0.3
          slot_ipv6_address: "::"
          vlan_id: 2

- name: Configure server Quick Deploy settings of the chassis using device service tag.
  dellemc.openmanage.ome_device_quick_deploy:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    device_service_tag: GHRT2RL
    setting_type: IOMQuickDeploy
    ca_path: "/path/to/ca_cert.pem"
    quick_deploy_options:
      password: "password"
      ipv4_enabled: true
      ipv4_network_type: Static
      ipv4_subnet_mask: 255.255.255.0
      ipv4_gateway: 192.168.0.1
      ipv6_enabled: true
      ipv6_network_type: Static
      ipv6_prefix_length: 1
      ipv6_gateway: "::"
      slots:
        - slot_id: 1
          slot_ipv4_address: 192.168.0.2
          slot_ipv6_address: "::"
          vlan_id: 1
        - slot_id: 2
          slot_ipv4_address: 192.168.0.3
          slot_ipv6_address: "::"
          vlan_id: 2

返回值

常见的返回值已在此处记录,以下是此模块特有的字段

描述

error_info

字典

HTTP错误的详细信息。

返回:HTTP错误时

示例: {"error": {"@Message.ExtendedInfo": [{"Message": "Unable to process the request because an error occurred.", "MessageArgs": [], "MessageId": "GEN1234", "RelatedProperties": [], "Resolution": "Retry the operation. If the issue persists, contact your system administrator.", "Severity": "Critical"}], "code": "Base.1.0.GeneralError", "message": "A general error has occurred. See ExtendedInfo for more information."}}

job_id

整数

提交的快速部署作业的作业ID。

返回:提交快速部署作业时。

示例: 1234

msg

字符串

设备快速部署设置的总体状态。

返回:始终

示例: "Successfully deployed the quick deploy settings."

quick_deploy_settings

字典

成功部署快速部署设置时返回。

返回:成功

示例: {"DeviceId": 25011, "IpV4Gateway": "192.168.0.1", "IpV4SubnetMask": "255.255.255.0", "IpV6Gateway": "::", "NetworkTypeV4": "Static", "NetworkTypeV6": "Static", "PrefixLength": "2", "ProtocolTypeV4": true, "ProtocolTypeV6": true, "SettingType": "ServerQuickDeploy", "slots": [{"DeviceCapabilities": [18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 41, 8, 7, 4, 3, 2, 1, 31, 30], "DeviceIPV4Address": "192.168.0.2", "DeviceIPV6Address": "::", "DeviceId": 25011, "Dhcpipv4": "Disabled", "Dhcpipv6": "Disabled", "Ipv4Enabled": "Enabled", "Ipv6Enabled": "Enabled", "Model": "PowerEdge MX840c", "SlotIPV4Address": "192.168.0.2", "SlotIPV6Address": "::", "SlotId": 1, "SlotSelected": true, "SlotSettingsApplied": true, "SlotType": "2000", "Type": "1000", "VlanId": "1"}, {"DeviceId": 0, "Model": "", "SlotIPV4Address": "0.0.0.0", "SlotIPV6Address": "::", "SlotId": 2, "SlotSelected": false, "SlotSettingsApplied": false, "SlotType": "2000", "Type": "0"}, {"DeviceId": 0, "Model": "", "SlotIPV4Address": "0.0.0.0", "SlotIPV6Address": "::", "SlotId": 3, "SlotSelected": false, "SlotSettingsApplied": false, "SlotType": "2000", "Type": "0"}, {"DeviceId": 0, "Model": "", "SlotIPV4Address": "0.0.0.0", "SlotIPV6Address": "::", "SlotId": 4, "SlotSelected": false, "SlotSettingsApplied": false, "SlotType": "2000", "Type": "0"}, {"DeviceId": 0, "Model": "", "SlotIPV4Address": "0.0.0.0", "SlotIPV6Address": "::", "SlotId": 5, "SlotSelected": false, "SlotSettingsApplied": false, "SlotType": "2000", "Type": "0"}, {"DeviceId": 0, "Model": "", "SlotIPV4Address": "0.0.0.0", "SlotIPV6Address": "::", "SlotId": 6, "SlotSelected": false, "SlotSettingsApplied": false, "SlotType": "2000", "Type": "0"}, {"DeviceId": 0, "Model": "", "SlotIPV4Address": "0.0.0.0", "SlotIPV6Address": "::", "SlotId": 7, "SlotSelected": false, "SlotSettingsApplied": false, "SlotType": "2000", "Type": "0"}, {"DeviceId": 0, "Model": "", "SlotIPV4Address": "0.0.0.0", "SlotIPV6Address": "::", "SlotId": 8, "SlotSelected": false, "SlotSettingsApplied": false, "SlotType": "2000", "Type": "0"}]}

作者

  • Felix Stephen (@felixs88)

  • Shivam Sharma (@ShivamSh3)

  • Kritika Bhateja (@Kritika-Bhateja-03)