• 博客
  • 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
    • Cloud 命名空间中的集合
    • Cloudscale_ch 命名空间中的集合
    • Community 命名空间中的集合
    • Containers 命名空间中的集合
    • Cyberark 命名空间中的集合
    • Dellemc 命名空间中的集合
    • 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 参考:模块实用程序
  • 特殊变量
  • Red Hat Ansible 自动化平台
  • Ansible 自动化中心
  • 记录 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

返回值

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

键

描述

数据

复杂

聚合链接列表。

返回:成功

id

字符串

链路聚合的 ID。

返回:成功

示例: "MTK3M4A2ZDdfM3=="

switch_ports

复杂

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

返回:成功

port_id

字符串

端口号。

返回:成功

示例: "1"

serial

字符串

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

返回:成功

示例: "ABCD-1234-WXYZ"

状态

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

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

作者

  • Kevin Breit (@kbreit)

集合链接

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

© 版权归 Ansible 项目贡献者所有。最后更新于 2024 年 12 月 06 日。