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

Ansible 入门

  • Ansible 入门指南
  • 执行环境入门指南

安装、升级和配置

  • 安装指南
  • Ansible 移植指南

使用 Ansible

  • 构建 Ansible 清单
  • 使用 Ansible 命令行工具
  • 使用 Ansible 剧本
  • 使用 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 命名空间中的集合
  • 所有模块和插件的索引
  • 剧本关键词
  • 返回值
  • Ansible 配置设置
  • 控制 Ansible 的行为:优先级规则
  • YAML 语法
  • Python 3 支持
  • 解释器发现
  • 版本发布和维护
  • 测试策略
  • 健全性测试
  • 常见问题
  • 术语表
  • Ansible 参考:模块实用程序
  • 特殊变量
  • Red Hat Ansible Automation Platform
  • Ansible Automation Hub
  • 记录 Ansible 输出

路线图

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




Ansible
  • 集合索引
  • Cisco 命名空间中的集合
  • Cisco.Meraki
  • cisco.meraki.networks_appliance_traffic_shaping_uplink_selection 模块 – 网络设备流量整形上行链路选择资源模块


cisco.meraki.networks_appliance_traffic_shaping_uplink_selection 模块 – 网络设备流量整形上行链路选择资源模块

注意

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

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

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

要在剧本中使用它,请指定: cisco.meraki.networks_appliance_traffic_shaping_uplink_selection。

cisco.meraki 2.16.0 中的新增功能

  • 概要

  • 要求

  • 参数

  • 备注

  • 另请参阅

  • 示例

  • 返回值

概要

  • 管理资源 networks_appliance_trafficshaping_uplinkselection 的操作更新。

  • 更新 MX 网络的上行链路选择设置。

注意

此模块具有相应的 动作插件。

要求

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

  • meraki >= 2.4.9

  • python >= 3.5

参数

参数

注释

activeActiveAutoVpnEnabled

布尔值

切换以启用或禁用主动-主动 AutoVPN。

选项

  • false

  • true

defaultUplink

字符串

默认上行链路。必须是“wan1”或“wan2”之一。

failoverAndFailback

字典

WAN 故障转移和故障恢复行为。

immediate

字典

立即 WAN 切换会在当前 WAN 被认为不可靠时终止当前 WAN 上的所有流量(新的和现有的)。

enabled

布尔值

切换以启用或禁用立即 WAN 故障转移和故障恢复。

选项

  • false

  • true

loadBalancingEnabled

布尔值

切换以启用或禁用负载均衡。

选项

  • false

  • true

meraki_action_batch_retry_wait_time

整数

meraki_action_batch_retry_wait_time(整数),操作批处理并发错误重试等待时间

默认值: 60

meraki_api_key

字符串 / 必需

meraki_api_key(字符串),在仪表板中生成的 API 密钥;也可以设置为环境变量 MERAKI_DASHBOARD_API_KEY

meraki_base_url

字符串

meraki_base_url(字符串),位于所有端点资源之前

默认值: "https://api.meraki.com/api/v1"

meraki_be_geo_id

字符串

meraki_be_geo_id(字符串),用于 API 使用跟踪的可选合作伙伴标识符;也可以设置为环境变量 BE_GEO_ID

默认值: ""

meraki_caller

字符串

meraki_caller(字符串),用于 API 使用跟踪的可选标识符;也可以设置为环境变量 MERAKI_PYTHON_SDK_CALLER

默认值: ""

meraki_certificate_path

字符串

meraki_certificate_path(字符串),位于本地代理后面的 TLS/SSL 证书验证的路径

默认值: ""

meraki_inherit_logging_config

布尔值

meraki_inherit_logging_config(布尔值),继承您自己的日志记录器实例

选项

  • false ← (默认)

  • true

meraki_log_file_prefix

字符串

meraki_log_file_prefix(字符串),日志文件名附加日期和时间戳

默认值: "meraki_api_"

meraki_log_path

字符串

log_path(字符串),输出日志的路径;如果未指定,则默认为脚本的工作目录

默认值: ""

meraki_maximum_retries

整数

meraki_maximum_retries(整数),遇到 429 或其他服务器端错误时最多重试这么多次

默认值: 2

meraki_nginx_429_retry_wait_time

整数

meraki_nginx_429_retry_wait_time(整数),Nginx 429 重试等待时间

默认值: 60

meraki_output_log

布尔值

meraki_output_log(布尔值),创建输出日志文件?

选项

  • false

  • true ← (默认)

meraki_print_console

布尔值

meraki_print_console(布尔值),将日志输出打印到控制台?

选项

  • false

  • true ← (默认)

meraki_requests_proxy

字符串

meraki_requests_proxy(字符串),如果需要,用于 HTTPS 的代理服务器和端口

默认值: ""

meraki_retry_4xx_error

布尔值

meraki_retry_4xx_error(布尔值),如果遇到其他 4XX 错误(除了 429)则重试?

选项

  • false ← (默认)

  • true

meraki_retry_4xx_error_wait_time

整数

meraki_retry_4xx_error_wait_time(整数),其他 4XX 错误重试等待时间

默认值: 60

meraki_simulate

布尔值

meraki_simulate(布尔值),模拟 POST/PUT/DELETE 调用以防止更改?

选项

  • false ← (默认)

  • true

meraki_single_request_timeout

整数

meraki_single_request_timeout(整数),每个 API 调用的最大秒数

默认值: 60

meraki_suppress_logging

布尔值

meraki_suppress_logging(布尔值),禁用所有日志记录?那么您就只能自求多福了!

选项

  • false ← (默认)

  • true

meraki_use_iterator_for_get_pages

布尔值

meraki_use_iterator_for_get_pages(布尔值),list* 方法将返回包含每个对象的迭代器,而不是包含所有项目的完整列表

选项

  • false ← (默认)

  • true

meraki_wait_on_rate_limit

布尔值

meraki_wait_on_rate_limit(布尔值),如果遇到 429 速率限制错误则重试?

选项

  • false

  • true ← (默认)

networkId

字符串

NetworkId 路径参数。网络 ID。

vpnTrafficUplinkPreferences

列表 / 元素=字典

VPN 流量的上行链路偏好规则数组。

failOverCriterion

字符串

此上行链路偏好规则的故障转移标准。必须是“poorPerformance”或“uplinkDown”之一。

performanceClass

字典

此上行链路偏好规则的性能等级设置。

builtinPerformanceClassName

字符串

内置性能等级的名称,当 performanceClass 类型为“builtin”时必须存在,并且值必须是“VoIP”之一。

customPerformanceClassId

字符串

已创建的自定义性能等级的 ID,当 performanceClass 类型为“custom”时必须存在。

type

字符串

此性能等级的类型。必须是“builtin”或“custom”之一。

preferredUplink

字符串

此上行链路偏好规则的首选上行链路。必须是“wan1”、“wan2”、“bestForVoIP”、“loadBalancing”或“defaultUplink”之一。

trafficFilters

列表 / 元素=字典

此上行链路偏好规则的流量过滤器数组。

type

字符串

此流量过滤器的类型。必须是“applicationCategory”、“application”或“custom”之一。

value

字典

此流量过滤器的值对象。

destination

字典

此自定义类型流量过滤器的目标。

cidr

字符串

CIDR 格式地址或“any”。例如,“192.168.10.0/24”、“192.168.10.1”(与“192.168.10.1/32”相同),“0.0.0.0/0”(与“any”相同)。

fqdn

字符串

FQDN 格式地址。目前仅在“vpnTrafficUplinkPreference”对象的“destination”中可用。例如,“www.google.com”。

host

整数

VLAN 中的主机 ID,应与“vlan”一起使用,并且不应超过 VLAN 子网容量。目前仅在模板网络下可用。

network

字符串

Meraki 网络 ID。目前仅在模板网络下可用,其值应为同一模板网络或另一个当前模板网络的 ID。例如:“L_12345678”。

端口

字符串

例如:“any”、“0”(也表示“any”)、“8080”、“1-1024”。

VLAN

整数

Meraki 网络中已配置 VLAN 的 VLAN ID。目前仅在模板网络下可用。

ID

字符串

此应用程序类别或应用程序类型流量过滤器的 ID。例如:“meraki layer7/category/1”、“meraki layer7/application/4”。

协议

字符串

此自定义类型流量过滤器的协议。必须是 'tcp'、'udp'、'icmp'、'icmp6' 或 'any' 之一。

源

字典

此自定义类型流量过滤器的源。

cidr

字符串

CIDR 格式地址或“any”。例如,“192.168.10.0/24”、“192.168.10.1”(与“192.168.10.1/32”相同),“0.0.0.0/0”(与“any”相同)。

host

整数

VLAN 中的主机 ID,应与“vlan”一起使用,并且不应超过 VLAN 子网容量。目前仅在模板网络下可用。

network

字符串

Meraki 网络 ID。目前仅在模板网络下可用,其值应为同一模板网络或另一个当前模板网络的 ID。例如:“L_12345678”。

端口

字符串

例如:“any”、“0”(也表示“any”)、“8080”、“1-1024”。

VLAN

整数

Meraki 网络中已配置 VLAN 的 VLAN ID。目前仅在模板网络下可用。

wanTrafficUplinkPreferences

列表 / 元素=字典

WAN 流量的上行链路偏好规则数组。

preferredUplink

字符串

此上行链路偏好规则的首选上行链路。必须是 'wan1' 或 'wan2' 之一。

trafficFilters

列表 / 元素=字典

此上行链路偏好规则的流量过滤器数组。

type

字符串

此流量过滤器的类型。必须是 'custom'。

value

字典

此流量过滤器的值对象。

destination

字典

此自定义类型流量过滤器的目标。

cidr

字符串

CIDR 格式地址或“any”。例如,“192.168.10.0/24”、“192.168.10.1”(与“192.168.10.1/32”相同),“0.0.0.0/0”(与“any”相同)。

端口

字符串

例如:“any”、“0”(也表示“any”)、“8080”、“1-1024”。

协议

字符串

此自定义类型流量过滤器的协议。必须是 'tcp'、'udp'、'icmp6' 或 'any' 之一。

源

字典

此自定义类型流量过滤器的源。

cidr

字符串

CIDR 格式地址或“any”。例如,“192.168.10.0/24”、“192.168.10.1”(与“192.168.10.1/32”相同),“0.0.0.0/0”(与“any”相同)。

host

整数

VLAN 中的主机 ID,应与“vlan”一起使用,并且不应超过 VLAN 子网容量。目前仅在模板网络下可用。

端口

字符串

例如:“any”、“0”(也表示“any”)、“8080”、“1-1024”。

VLAN

整数

Meraki 网络中已配置 VLAN 的 VLAN ID。目前仅在模板网络下可用。

注释

注意

  • 使用的 SDK 方法为 appliance.Appliance.update_network_appliance_traffic_shaping_uplink_selection,

  • 使用的路径为 put /networks/{networkId}/appliance/trafficShaping/uplinkSelection,

  • 不支持 check_mode

  • 插件在控制节点上运行,不使用任何 Ansible 连接插件,而是使用 Cisco DNAC SDK 中的嵌入式连接管理器。

  • 以 dnac_ 开头的参数由 Cisco DNAC Python SDK 用于建立连接。

另请参见

另请参见

Cisco Meraki 关于 appliance updateNetworkApplianceTrafficShapingUplinkSelection 的文档

updateNetworkApplianceTrafficShapingUplinkSelection API 的完整参考。

示例

- name: Update all
  cisco.meraki.networks_appliance_traffic_shaping_uplink_selection:
    meraki_api_key: "{{meraki_api_key}}"
    meraki_base_url: "{{meraki_base_url}}"
    meraki_single_request_timeout: "{{meraki_single_request_timeout}}"
    meraki_certificate_path: "{{meraki_certificate_path}}"
    meraki_requests_proxy: "{{meraki_requests_proxy}}"
    meraki_wait_on_rate_limit: "{{meraki_wait_on_rate_limit}}"
    meraki_nginx_429_retry_wait_time: "{{meraki_nginx_429_retry_wait_time}}"
    meraki_action_batch_retry_wait_time: "{{meraki_action_batch_retry_wait_time}}"
    meraki_retry_4xx_error: "{{meraki_retry_4xx_error}}"
    meraki_retry_4xx_error_wait_time: "{{meraki_retry_4xx_error_wait_time}}"
    meraki_maximum_retries: "{{meraki_maximum_retries}}"
    meraki_output_log: "{{meraki_output_log}}"
    meraki_log_file_prefix: "{{meraki_log_file_prefix}}"
    meraki_log_path: "{{meraki_log_path}}"
    meraki_print_console: "{{meraki_print_console}}"
    meraki_suppress_logging: "{{meraki_suppress_logging}}"
    meraki_simulate: "{{meraki_simulate}}"
    meraki_be_geo_id: "{{meraki_be_geo_id}}"
    meraki_use_iterator_for_get_pages: "{{meraki_use_iterator_for_get_pages}}"
    meraki_inherit_logging_config: "{{meraki_inherit_logging_config}}"
    state: present
    activeActiveAutoVpnEnabled: true
    defaultUplink: wan1
    failoverAndFailback:
      immediate:
        enabled: true
    loadBalancingEnabled: true
    networkId: string
    vpnTrafficUplinkPreferences:
    - failOverCriterion: poorPerformance
      performanceClass:
        builtinPerformanceClassName: VoIP
        customPerformanceClassId: '123456'
        type: custom
      preferredUplink: bestForVoIP
      trafficFilters:
      - type: applicationCategory
        value:
          destination:
            cidr: any
            fqdn: www.google.com
            host: 254
            network: L_12345678
            port: 1-1024
            vlan: 10
          id: meraki:layer7/category/1
          protocol: tcp
          source:
            cidr: 192.168.1.0/24
            host: 200
            network: L_23456789
            port: any
            vlan: 20
    wanTrafficUplinkPreferences:
    - preferredUplink: wan1
      trafficFilters:
      - type: custom
        value:
          destination:
            cidr: any
            port: any
          protocol: tcp
          source:
            cidr: 192.168.1.0/24
            host: 254
            port: 1-1024
            vlan: 10

返回值

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

键

描述

meraki_response

字典

包含 Cisco Meraki Python SDK 返回的响应的字典或列表。

返回值:始终

示例: {"activeActiveAutoVpnEnabled": true, "defaultUplink": "string", "failoverAndFailback": {"immediate": {"enabled": true}}, "loadBalancingEnabled": true, "vpnTrafficUplinkPreferences": [{"failOverCriterion": "string", "performanceClass": {"builtinPerformanceClassName": "string", "customPerformanceClassId": "string", "type": "string"}, "preferredUplink": "string", "trafficFilters": [{"type": "string", "value": {"destination": {"cidr": "string", "fqdn": "string", "host": 0, "network": "string", "port": "string", "vlan": 0}, "id": "string", "protocol": "string", "source": {"cidr": "string", "host": 0, "network": "string", "port": "string", "vlan": 0}}}]}], "wanTrafficUplinkPreferences": [{"preferredUplink": "string", "trafficFilters": [{"type": "string", "value": {"destination": {"cidr": "string", "port": "string"}, "protocol": "string", "source": {"cidr": "string", "host": 0, "port": "string", "vlan": 0}}}]}]}

作者

  • Francisco Munoz (@fmunoz)

收藏链接

  • 问题追踪器
  • 代码库 (源代码)
上一页 下一页

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