• 博客
  • Ansible 社区论坛
  • 文档
Ansible Logo
Ansible 社区文档
Ansible

Ansible 入门

  • Ansible 入门
  • 执行环境入门

安装、升级和配置

  • 安装指南
  • Ansible 移植指南

使用 Ansible

  • 构建 Ansible 清单
  • 使用 Ansible 命令行工具
  • 使用 Ansible Playbook
  • 使用 Ansible Vault 保护敏感数据
  • 使用 Ansible 模块和插件
  • 使用 Ansible 集合
  • 在 Windows 和 BSD 上使用 Ansible
  • Ansible 提示和技巧

为 Ansible 做贡献

  • Ansible 社区指南
  • Ansible 集合贡献者指南
  • ansible-core 贡献者指南
  • 高级贡献者指南
  • Ansible 文档风格指南

扩展 Ansible

  • 开发者指南

常见 Ansible 场景

  • 传统公有云指南

网络自动化

  • 网络入门
  • 网络高级主题
  • 网络开发者指南

Ansible Galaxy

  • Galaxy 用户指南
  • Galaxy 开发者指南

参考和附录

  • 集合索引
    • Amazon 命名空间中的集合
    • Ansible 命名空间中的集合
    • Arista 命名空间中的集合
    • Awx 命名空间中的集合
    • Azure 命名空间中的集合
    • Check_point 命名空间中的集合
    • Chocolatey 命名空间中的集合
    • Cisco 命名空间中的集合
    • Cloud 命名空间中的集合
    • Cloudscale_ch 命名空间中的集合
    • Community 命名空间中的集合
    • Containers 命名空间中的集合
    • Cyberark 命名空间中的集合
    • Dellemc 命名空间中的集合
      • Dellemc.Enterprise_Sonic
      • Dellemc.Openmanage
        • 描述
        • 插件索引
        • 角色索引
      • Dellemc.Powerflex
      • Dellemc.Unity
    • F5networks 命名空间中的集合
    • Fortinet 命名空间中的集合
    • Frr 命名空间中的集合
    • Gluster 命名空间中的集合
    • Google 命名空间中的集合
    • Grafana 命名空间中的集合
    • Hetzner 命名空间中的集合
    • Hpe 命名空间中的集合
    • Ibm 命名空间中的集合
    • Ieisystem 命名空间中的集合
    • Infinidat 命名空间中的集合
    • Infoblox 命名空间中的集合
    • Inspur 命名空间中的集合
    • Junipernetworks 命名空间中的集合
    • Kaytus 命名空间中的集合
    • Kubernetes 命名空间中的集合
    • Kubevirt 命名空间中的集合
    • Lowlydba 命名空间中的集合
    • Mellanox 命名空间中的集合
    • Microsoft 命名空间中的集合
    • Netapp 命名空间中的集合
    • Netapp_eseries 命名空间中的集合
    • Netbox 命名空间中的集合
    • Ngine_io 命名空间中的集合
    • Openstack 命名空间中的集合
    • Openvswitch 命名空间中的集合
    • Ovirt 命名空间中的集合
    • Purestorage 命名空间中的集合
    • Sensu 命名空间中的集合
    • Servicenow 命名空间中的集合
    • Splunk 命名空间中的集合
    • T_systems_mms 命名空间中的集合
    • Telekom_mms 命名空间中的集合
    • Theforeman 命名空间中的集合
    • Vmware 命名空间中的集合
    • Vultr 命名空间中的集合
    • Vyos 命名空间中的集合
    • Wti 命名空间中的集合
  • 所有模块和插件的索引
  • Playbook 关键字
  • 返回值
  • Ansible 配置设置
  • 控制 Ansible 的行为方式:优先级规则
  • YAML 语法
  • Python 3 支持
  • 解释器发现
  • 发布和维护
  • 测试策略
  • 健全性测试
  • 常见问题
  • 词汇表
  • Ansible 参考:模块实用程序
  • 特殊变量
  • 红帽 Ansible 自动化平台
  • Ansible Automation Hub
  • 记录 Ansible 输出

路线图

  • Ansible 路线图
  • ansible-core 路线图




Ansible
  • 集合索引
  • Dellemc 命名空间中的集合
  • Dellemc.Openmanage
  • dellemc.openmanage.ome_smart_fabric_uplink 模块 – 在 OpenManage Enterprise Modular 上为 Fabric 创建、修改或删除上行链路


dellemc.openmanage.ome_smart_fabric_uplink 模块 – 在 OpenManage Enterprise Modular 上为 Fabric 创建、修改或删除上行链路

注意

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

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

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

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

dellemc.openmanage 2.1.0 中的新增功能

  • 概要

  • 要求

  • 参数

  • 注意

  • 示例

  • 返回值

概要

  • 此模块允许为 Fabric 创建、修改或删除上行链路。

要求

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

  • python >= 3.9.6

参数

参数

注释

ca_path

路径

在 dellemc.openmanage 5.0.0 中添加

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

description

字符串

为要创建或修改的上行链路提供简短描述。

fabric_name

字符串 / 必需

提供要配置上行链路的 Fabric 的 fabric_name。

hostname

字符串 / 必需

OpenManage Enterprise Modular IP 地址或主机名。

name

字符串 / 必需

提供要创建、修改或删除的上行链路的 name。

new_name

字符串

提供上行链路的新 new_name。

password

字符串

OpenManage Enterprise Modular 密码。

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

示例:export OME_PASSWORD=password

port

整数

OpenManage Enterprise Modular HTTPS 端口。

默认值: 443

primary_switch_ports

列表 / elements=字符串

要连接到主交换机的 IOM 插槽。

此选项必须提供 primary_switch_service_tag。

primary_switch_service_tag

字符串

主交换机的服务标签。

secondary_switch_ports

列表 / elements=字符串

要连接到辅助交换机的 IOM 插槽。

此选项必须提供 secondary_switch_service_tag。

secondary_switch_service_tag

字符串

辅助交换机的服务标签。

state

字符串

present - 使用提供的 name 创建新的上行链路。- 使用提供的 name 修改现有上行链路。

absent – 删除具有提供的 name 的上行链路。

警告 删除操作可能会影响网络基础设施。

选项

  • "present" ← (默认)

  • "absent"

tagged_networks

列表 / elements=字符串

要与上行链路 name 关联的 VLAN。

timeout

整数

在 dellemc.openmanage 5.0.0 中添加

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

默认值: 30

ufd_enable

字符串

将上行链路添加到上行链路故障检测 (UFD) 组或从该组中删除。UFD 组识别与上游交换机的连接丢失,并通知连接到该交换机的服务器。在上行链路发生故障期间,交换机会禁用相应的下游服务器端口。然后,下游服务器可以选择其他可用的连接路由(如果可用)。

警告 运行 Fabric Manager 的 I/O 模块的固件版本必须支持此配置功能。否则,将成功创建上行链路,并在响应中提供相应的错误消息。

选项

  • "Enabled"

  • "Disabled"

untagged_network

字符串

指定要作为未标记 VLAN 添加到上行链路的 VLAN 名称。

uplink_type

字符串

指定上行链路类型。

注意 无法更改现有上行链路的上行链路类型。

选项

  • "Ethernet"

  • "FCoE"

  • "FC 网关"

  • "FC 直接连接"

  • "以太网 - 无 生成树"

用户名

字符串

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

备注

注意

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

  • 此模块支持 check_mode。

示例

---
- name: Create an Uplink
  dellemc.openmanage.ome_smart_fabric_uplink:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    state: "present"
    fabric_name: "fabric1"
    name: "uplink1"
    description: "CREATED from OMAM"
    uplink_type: "Ethernet"
    ufd_enable: "Enabled"
    primary_switch_service_tag: "ABC1234"
    primary_switch_ports:
      - ethernet1/1/13
      - ethernet1/1/14
    secondary_switch_service_tag: "XYZ1234"
    secondary_switch_ports:
      - ethernet1/1/13
      - ethernet1/1/14
    tagged_networks:
      - vlan1
      - vlan3
    untagged_network: vlan2
  tags: create_uplink

- name: Modify an existing uplink
  dellemc.openmanage.ome_smart_fabric_uplink:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    state: "present"
    fabric_name: "fabric1"
    name: "uplink1"
    new_name: "uplink2"
    description: "Modified from OMAM"
    uplink_type: "Ethernet"
    ufd_enable: "Disabled"
    primary_switch_service_tag: "DEF1234"
    primary_switch_ports:
      - ethernet1/2/13
      - ethernet1/2/14
    secondary_switch_service_tag: "TUV1234"
    secondary_switch_ports:
      - ethernet1/2/13
      - ethernet1/2/14
    tagged_networks:
      - vlan11
      - vlan33
    untagged_network: vlan22
  tags: modify_uplink

- name: Delete an Uplink
  dellemc.openmanage.ome_smart_fabric_uplink:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    state: "absent"
    fabric_name: "fabric1"
    name: "uplink1"
  tags: delete_uplink

- name: Modify an Uplink name
  dellemc.openmanage.ome_smart_fabric_uplink:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    state: "present"
    fabric_name: "fabric1"
    name: "uplink1"
    new_name: "uplink2"
  tags: modify_uplink_name

- name: Modify Uplink ports
  dellemc.openmanage.ome_smart_fabric_uplink:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    state: "present"
    fabric_name: "fabric1"
    name: "uplink1"
    description: "uplink ports modified"
    primary_switch_service_tag: "ABC1234"
    primary_switch_ports:
      - ethernet1/1/6
      - ethernet1/1/7
    secondary_switch_service_tag: "XYZ1234"
    secondary_switch_ports:
      - ethernet1/1/9
      - ethernet1/1/10
  tags: modify_ports

- name: Modify Uplink networks
  dellemc.openmanage.ome_smart_fabric_uplink:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    state: "present"
    fabric_name: "fabric1"
    name: "create1"
    description: "uplink networks modified"
    tagged_networks:
      - vlan4
  tags: modify_networks

返回值

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

键

描述

additional_info

字典

结构操作的附加详细信息。

返回: 当 state=present 且响应中存在附加信息时。

示例: {"error": {"@Message.ExtendedInfo": [{"Message": "无法在 上行链路 上配置上行链路故障检测模式,因为运行结构管理器的 I/O 模块的固件版本不支持配置功能。", "MessageArgs": [], "MessageId": "CDEV7151", "RelatedProperties": [], "Resolution": "更新运行结构管理器的 I/O 模块的固件版本,然后重试该操作。 有关建议的 I/O 模块固件版本的信息,请参阅支持站点上提供的 OpenManage Enterprise-Modular 用户指南。", "Severity": "Informational"}], "code": "Base.1.0.GeneralError", "message": "发生了一般错误。 有关更多信息,请参阅 ExtendedInfo。"}}

error_info

字典

HTTP 错误的详细信息。

返回: HTTP 错误时

示例: {"error": {"@Message.ExtendedInfo": [{"Message": "无法完成请求,因为资源 URI 不存在或未实现。", "MessageArgs": [], "MessageId": "CGEN1006", "RelatedProperties": [], "Resolution": "检查请求资源 URI。 有关资源 URI 及其属性的详细信息,请参阅 OpenManage Enterprise-Modular 用户指南。", "Severity": "Critical"}], "code": "Base.1.0.GeneralError", "message": "发生了一般错误。 有关更多信息,请参阅 ExtendedInfo。"}}

msg

字符串

上行链路操作的总体状态。

返回: 始终

示例: "成功修改了上行链路。"

uplink_id

字符串

创建或修改上行链路时返回 ID。

返回: 当 state=present 时

示例: "ddc3d260-fd71-46a1-97f9-708e12345678"

作者

  • Jagadeesh N V(@jagadeeshnv)

集合链接

  • 问题跟踪器
  • 主页
  • 存储库(源)
上一个 下一个

© Copyright Ansible 项目贡献者。 最后更新于 2024 年 12 月 19 日。