• 博客
  • 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 命名空间中的集合
      • Cisco.Aci
      • Cisco.Asa
      • Cisco.Dnac
      • Cisco.Intersight
      • Cisco.Ios
      • Cisco.Iosxr
      • Cisco.Ise
      • Cisco.Meraki
        • 描述
        • 插件索引
      • Cisco.Mso
      • Cisco.Nxos
      • Cisco.Ucs
    • 云命名空间中的集合
    • Cloudscale_ch 命名空间中的集合
    • 社区命名空间中的集合
    • 容器命名空间中的集合
    • CyberArk 命名空间中的集合
    • Dell EMC 命名空间中的集合
    • F5 Networks 命名空间中的集合
    • Fortinet 命名空间中的集合
    • FRR 命名空间中的集合
    • Gluster 命名空间中的集合
    • Google 命名空间中的集合
    • Grafana 命名空间中的集合
    • Hetzner 命名空间中的集合
    • HPE 命名空间中的集合
    • IBM 命名空间中的集合
    • IEISystem 命名空间中的集合
    • Infinidat 命名空间中的集合
    • Infoblox 命名空间中的集合
    • Inspur 命名空间中的集合
    • Juniper Networks 命名空间中的集合
    • Kaytus 命名空间中的集合
    • Kubernetes 命名空间中的集合
    • KubeVirt 命名空间中的集合
    • LowlyDBA 命名空间中的集合
    • Mellanox 命名空间中的集合
    • Microsoft 命名空间中的集合
    • NetApp 命名空间中的集合
    • NetApp_eSeries 命名空间中的集合
    • Netbox 命名空间中的集合
    • NGINX IO 命名空间中的集合
    • OpenStack 命名空间中的集合
    • Open vSwitch 命名空间中的集合
    • oVirt 命名空间中的集合
    • PureStorage 命名空间中的集合
    • Sensu 命名空间中的集合
    • ServiceNow 命名空间中的集合
    • Splunk 命名空间中的集合
    • T-Systems MMS 命名空间中的集合
    • Telekom MMS 命名空间中的集合
    • The Foreman 命名空间中的集合
    • VMware 命名空间中的集合
    • Vultr 命名空间中的集合
    • VyOS 命名空间中的集合
    • WTI 命名空间中的集合
  • 所有模块和插件的索引
  • Playbook 关键字
  • 返回值
  • Ansible 配置设置
  • 控制 Ansible 的行为:优先级规则
  • YAML 语法
  • Python 3 支持
  • 解释器发现
  • 发布和维护
  • 测试策略
  • 健全性测试
  • 常见问题
  • 词汇表
  • Ansible 参考:模块实用程序
  • 特殊变量
  • Red Hat Ansible Automation Platform
  • Ansible Automation Hub
  • 记录 Ansible 输出

路线图

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




Ansible
  • 集合索引
  • Cisco 命名空间中的集合
  • Cisco.Meraki
  • cisco.meraki.meraki_ms_link_aggregation 模块 – 管理 MS 交换机的链路聚合


cisco.meraki.meraki_ms_link_aggregation 模块 – 管理 MS 交换机的链路聚合

注意

此模块是 cisco.meraki 集合 (版本 2.18.3) 的一部分。

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

要安装它,请使用: ansible-galaxy collection install cisco.meraki。

要在 playbook 中使用它,请指定: cisco.meraki.meraki_ms_link_aggregation。

cisco.meraki 1.2.0 中的新增功能

  • 已弃用

  • 概要

  • 参数

  • 备注

  • 示例

  • 返回值

  • 状态

已弃用

在以下版本中移除:

3.0.0 版本

原因:

发布了具有增强功能的更新模块

替代方案:

cisco.meraki.networks_switch_link_aggregations

概要

  • 允许在 Meraki 环境中管理 MS 交换机的链路聚合。

参数

参数

注释

auth_key

字符串 / 必需

仪表板提供的身份验证密钥。如果未设置环境变量 MERAKI_KEY,则需要此参数。

host

字符串

Meraki 仪表板的主机名。

可用于访问区域性 Meraki 环境,例如中国。

默认值: "api.meraki.com"

internal_error_retry_time

整数

如果服务器返回内部服务器错误,则重试的秒数。

默认值: 60

lag_id

字符串

要查询或修改的 LAG 的 ID。

net_id

字符串

网络的 ID。

net_name

字符串

网络的名称。

org_id

字符串

组织的 ID。

org_name

别名:organization

字符串

组织的名称。

output_format

字符串

指示模块响应键值是否应为蛇形命名法(例如 net_id)或驼峰命名法(例如 netId)。

选项

  • "snakecase" ← (默认)

  • "camelcase"

output_level

字符串

设置模块执行期间的调试输出量。

选项

  • "debug"

  • "normal" ← (默认)

rate_limit_retry_time

整数

如果触发速率限制器,则重试的秒数。

默认值: 165

state

字符串

指定是否应查询或修改 SNMP 信息。

选项

  • "absent"

  • "query"

  • "present" ← (默认)

switch_ports

列表 / 元素=字典

要包含在链路聚合中的交换机端口列表。

port_id

字符串

应包含在链路聚合中的端口号。

serial

字符串

拥有链路聚合的交换机的序列号。

timeout

整数

HTTP 请求的超时时间。

默认值: 30

use_https

布尔值

如果为 no,它将使用 HTTP。否则,它将使用 HTTPS。

仅对 Meraki 内部开发人员有用。

选项

  • false

  • true ← (默认)

use_proxy

布尔值

如果为 no,即使目标主机上的环境变量中定义了代理,它也不会使用代理。

选项

  • false ← (默认)

  • true

validate_certs

布尔值

是否验证 HTTP 证书。

选项

  • false

  • true ← (默认)

备注

注意

  • 此模块不支持交换机配置文件端口。

  • 有关 Meraki API 的更多信息,请访问 https://dashboard.meraki.com/api_docs。

  • 某些选项可能仅供 Meraki 内部开发人员使用。

  • 从 Ansible 2.9 开始,Meraki 模块将键输出为蛇形命名法。要使用驼峰命名法,请将 ANSIBLE_MERAKI_FORMAT 环境变量设置为 camelcase。

  • Ansible 的 Meraki 模块将在 Ansible 2.13 中停止支持驼峰命名法输出。请更新您的 playbook。

  • 检查模式会从仪表板下载当前配置,然后将更改与该下载进行比较。如果配置存在差异,检查模式将报告已更改,但不会将更改提交到 API 以进行更改验证。

示例

- name: Create LAG
  meraki_ms_link_aggregation:
    auth_key: '{{auth_key}}'
    state: present
    org_name: '{{test_org_name}}'
    net_name: '{{test_switch_net_name}}'
    switch_ports:
      - serial: '{{serial_switch}}'
        port_id: "1"
      - serial: '{{serial_switch}}'
        port_id: "2"
  delegate_to: localhost

- name: Update LAG
  meraki_ms_link_aggregation:
    auth_key: '{{auth_key}}'
    state: present
    org_name: '{{test_org_name}}'
    net_name: '{{test_switch_net_name}}'
    lag_id: '{{lag_id}}'
    switch_ports:
      - serial: '{{serial_switch}}'
        port_id: "1"
      - serial: '{{serial_switch}}'
        port_id: "2"
      - serial: '{{serial_switch}}'
        port_id: "3"
      - serial: '{{serial_switch}}'
        port_id: "4"
  delegate_to: localhost

返回值

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

键

描述

data

复杂类型

聚合链路的列表。

返回:成功

id

字符串

链路聚合的 ID。

返回:成功

示例: "MTK3M4A2ZDdfM3=="

switch_ports

复杂类型

要包含在链路聚合中的交换机端口列表。

返回:成功

port_id

字符串

端口号。

返回:成功

示例: "1"

serial

字符串

端口所在的交换机的序列号。

返回:成功

示例: "ABCD-1234-WXYZ"

状态

  • 此模块将在3.0.0版本中移除。[已弃用]

  • 更多信息请参见 已弃用。

作者

  • Kevin Breit (@kbreit)

资源链接

  • 问题追踪器
  • 代码仓库
上一篇 下一篇

© 版权所有 Ansible 项目贡献者。 上次更新于 2024年12月19日。