• 博客
  • 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 命名空间中的集合
    • 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 Automation Platform
  • Ansible Automation Hub
  • 记录 Ansible 输出

路线图

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




Ansible
  • 集合索引
  • Cisco 命名空间中的集合
  • Cisco.Meraki
  • cisco.meraki.organizations_devices_uplinks_addresses_by_device_info 模块 – 用于 organizations_devices_uplinks_addresses_bydevice 的信息模块


cisco.meraki.organizations_devices_uplinks_addresses_by_device_info 模块 – 用于 organizations_devices_uplinks_addresses_bydevice 的信息模块

注意

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

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

要安装它,请使用:ansible-galaxy collection install cisco.meraki。您需要其他要求才能使用此模块,请参阅 需求了解详情。

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

cisco.meraki 2.16.0 中的新增功能

  • 概要

  • 需求

  • 参数

  • 备注

  • 另请参阅

  • 示例

  • 返回值

概要

  • 获取所有 organizations_devices_uplinks_addresses_bydevice。

  • 列出组织中设备的当前上行链路地址。

注意

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

需求

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

  • meraki >= 2.4.9

  • python >= 3.5

参数

参数

注释

direction

字符串

direction (字符串),分页方向,为“next”(默认)或“prev”页

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

endingBefore

字符串

EndingBefore 查询参数。服务器用来指示页面结尾的令牌。通常是时间戳或 ID,但不限于这些。此参数不应由客户端应用程序定义。HTTP Link 标头中第一页、最后一页、上一页或下一页的链接应定义它。

headers

字典

附加标头。

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 ← (默认)

networkIds

列表 / 元素=字符串

NetworkIds 查询参数。可选参数,用于按网络 ID 筛选设备上行链路。此筛选器使用多个精确匹配。

organizationId

字符串

OrganizationId 路径参数。组织 ID。

perPage

整数

PerPage 查询参数。返回的每页条目数。可接受的范围是 3-1000。默认为 1000。

productTypes

列表 / 元素=字符串

ProductTypes 查询参数。可选参数,用于根据设备产品类型过滤设备上行链路。此过滤器使用多个精确匹配。

serials

列表 / 元素=字符串

Serials 查询参数。可选参数,用于根据设备序列号过滤设备可用性。此过滤器使用多个精确匹配。

startingAfter

字符串

StartingAfter 查询参数。服务器用来指示页面起始位置的令牌。通常是时间戳或ID,但不限于这些。客户端应用程序不应定义此参数。HTTP Link 头中第一页、最后一页、上一页或下一页的链接应定义它。

tags

列表 / 元素=字符串

Tags 查询参数。可选参数,用于根据标签过滤设备。过滤区分大小写。如果包含标签,则也应包含“tagsFilterType”(见下文)。此过滤器使用多个精确匹配。

tagsFilterType

字符串

TagsFilterType 查询参数。可选参数,值为“withAnyTags”或“withAllTags”,用于指示是返回包含任何标签还是所有标签的设备。如果未包含类型,则将选择“withAnyTags”。

total_pages

字符串 / 必需

total_pages(int),与 perPage 一起使用以获取最多 total_pages*perPage 的总结果;-1 表示所有页面

备注

注意

  • 使用的SDK方法为 organizations.Organizations.get_organization_devices_uplinks_addresses_by_device,

  • 使用的路径为 get /organizations/{organizationId}/devices/uplinks/addresses/byDevice,

  • 支持 check_mode

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

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

另见

另见

Cisco Meraki 文档,关于 organizations getOrganizationDevicesUplinksAddressesByDevice

getOrganizationDevicesUplinksAddressesByDevice API 的完整参考。

示例

- name: Get all organizations _devices _uplinks _addresses _bydevice
  cisco.meraki.organizations_devices_uplinks_addresses_by_device_info:
    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}}"
    perPage: 0
    startingAfter: string
    endingBefore: string
    networkIds: []
    productTypes: []
    serials: []
    tags: []
    tagsFilterType: string
    organizationId: string
    total_pages: -1
    direction: next
  register: result

返回值

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

键

描述

meraki_response

列表 / 元素=字典

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

返回值:始终

示例: "[\n  {\n    \"mac\": \"string\",\n    \"name\": \"string\",\n    \"network\": {\n      \"id\": \"string\"\n    },\n    \"productType\": \"string\",\n    \"serial\": \"string\",\n    \"tags\": [\n      \"string\"\n    ],\n    \"uplinks\": [\n      {\n        \"addresses\": [\n          {\n            \"address\": \"string\",\n            \"assignmentMode\": \"string\",\n            \"gateway\": \"string\",\n            \"protocol\": \"string\",\n            \"public\": {\n              \"address\": \"string\"\n            }\n          }\n        ],\n        \"interface\": \"string\"\n      }\n    ]\n  }\n]\n"

作者

  • Francisco Munoz (@fmunoz)

相关链接

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

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