dellemc.openmanage.ome_server_interface_profiles 模块 – 配置服务器接口配置文件

注意

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

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

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

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

dellemc.openmanage 5.1.0 中的新增功能

概要

  • 此模块允许在 OpenManage Enterprise Modular 上配置服务器接口配置文件。

要求

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

  • python >= 3.9.6

参数

参数

注释

ca_path

路径

dellemc.openmanage 5.0.0 中添加

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

device_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

nic_configuration

列表 / 元素=字典

要应用于服务器的 NIC 配置。

nic_identifier

字符串 / 必需

NIC 的 ID 或端口号。

注意 这不会被验证。

tagged_networks

字典

标记网络的列表

如果网络已分配给未标记网络,则无法将其添加为标记网络

names

列表 / 元素=字符串 / 必需

要标记为已标记网络的网络名称列表

可以使用 dellemc.openmanage.ome_network_vlan_info 获取 names

state

字符串

指示是否需要添加或删除网络列表。

present 将网络添加到已标记列表

absent 从已标记列表中删除网络

选项

  • "present" ← (默认)

  • "absent"

team

布尔值

将两个或多个端口分组。这些端口必须连接到同一对以太网交换机。

仅当 nic_teamingLACP 时,team 才适用。

选项

  • false

  • true

untagged_network

整数

要取消标记的网络的最大或最小 VLAN ID。

可以使用 dellemc.openmanage.ome_network_vlan_info 获取 untagged_network

如果需要取消设置 untagged_network,则需要将其发送为 0

注意 如果网络已分配给已标记网络,则无法将其添加为未标记网络。

nic_teaming

字符串

NIC 团队选项。

NoTeaming NIC 未绑定,不提供负载平衡或冗余。

LACP 使用 LACP 进行 NIC 团队。

Other 使用其他技术进行 NIC 团队。

选项

  • "LACP"

  • "NoTeaming"

  • "Other"

password

字符串

OpenManage Enterprise Modular 密码。

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

示例:export OME_PASSWORD=password

port

整数

OpenManage Enterprise Modular HTTPS 端口。

默认值: 443

timeout

整数

dellemc.openmanage 5.0.0 中添加

套接字级别超时(秒)。

默认值: 30

username

字符串

OpenManage Enterprise Modular 用户名。

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

示例:export OME_USERNAME=username

validate_certs

布尔值

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

备注

注意

  • 此模块支持 check_mode

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

示例

---
- name: Modify Server Interface Profile for the server using the service tag
  dellemc.openmanage.ome_server_interface_profiles:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    device_service_tag:
      - SVCTAG1
      - SVCTAG2
    nic_teaming: LACP
    nic_configuration:
      - nic_identifier: NIC.Mezzanine.1A-1-1
        team: false
        untagged_network: 2
        tagged_networks:
          names:
            - vlan1
      - nic_identifier: NIC.Mezzanine.1A-2-1
        team: true
        untagged_network: 3
        tagged_networks:
          names:
            - range120-125

- name: Modify Server Interface Profile for the server using the device id
  dellemc.openmanage.ome_server_interface_profiles:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    device_id:
      - 34523
      - 48999
    nic_teaming: NoTeaming
    nic_configuration:
      - nic_identifier: NIC.Mezzanine.1A-1-1
        team: false
        untagged_network: 2
        tagged_networks:
          names:
            - vlan2
      - nic_identifier: NIC.Mezzanine.1A-2-1
        team: true
        untagged_network: 3
        tagged_networks:
          names:
            - range120-125

返回值

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

描述

error_info

字典

HTTP 错误的详细信息。

返回:HTTP 错误时

示例: {"error": {"@Message.ExtendedInfo": [{"Message": "由于发生错误,无法处理请求。", "MessageArgs": [], "MessageId": "GEN1234", "RelatedProperties": [], "Resolution": "重试操作。如果问题仍然存在,请联系您的系统管理员。", "Severity": "Critical"}], "code": "Base.1.0.GeneralError", "message": "发生一般错误。有关更多信息,请参阅 ExtendedInfo。"} }

job_id

整数

应用服务器接口配置文件的任务的作业 ID。

返回:应用接口配置文件时

示例: 14123

msg

字符串

整个服务器接口操作的状态。

返回:始终返回

示例: "已成功触发应用服务器配置文件作业。"

作者

  • Jagadeesh N V (@jagadeeshnv)