100%

meraki_facts

module
Gather facts about Meraki Dashboard resources
Added in version 0.1.0

Synopsis

  • Gather facts about organizations, networks, devices, and inventory from the Meraki Dashboard API.
  • This is a gather-only module that collects information without making changes.

Author

Cisco Meraki

Parameters

gather_subset (list/str)
allorganizationsnetworksdevicesinventory

What to gather.

network_id (str)

Scope to a specific network.

organization_id (str)

Scope to a specific organization.

Sample Task

A template task showing all available parameters with their defaults or example values.

- name: Meraki Facts task
  cisco.meraki_rm.meraki_facts:
    gather_subset:
      - "gather_subset_item"
    network_id: "192.168.1.0/24"
    organization_id: "organization_id_value"
- name: Meraki Facts task
  cisco.meraki_rm.meraki_facts:
    gather_subset:  # optional
      - "gather_subset_item"
    network_id: "192.168.1.0/24"  # optional
    organization_id: "organization_id_value"  # optional
- name: Meraki Facts task
  cisco.meraki_rm.meraki_facts:
    gather_subset:  # (list, optional) What to gather.
      - "gather_subset_item"
    network_id: "192.168.1.0/24"  # (str, optional) Scope to a specific network.
    organization_id: "organization_id_value"  # (str, optional) Scope to a specific organization.

Examples

Gather All Meraki Facts
- name: Gather all Meraki facts
  cisco.meraki_rm.meraki_facts:
    organization_id: "N_123456789012345678"
    gather_subset:
      - all
  register: all_facts
Display Gathered Facts
- name: Display gathered facts
  ansible.builtin.debug:
    var: all_facts
Gather Only Organization Info
- name: Gather only organization info
  cisco.meraki_rm.meraki_facts:
    organization_id: "N_123456789012345678"
    gather_subset:
      - organizations
Gather Networks For A Specific Org
- name: Gather networks for a specific org
  cisco.meraki_rm.meraki_facts:
    organization_id: "N_123456789012345678"
    gather_subset:
      - networks
---
# Gather all Meraki facts

- name: Gather all Meraki facts
  cisco.meraki_rm.meraki_facts:
    organization_id: "N_123456789012345678"
    gather_subset:
      - all
  register: all_facts

- name: Display gathered facts
  ansible.builtin.debug:
    var: all_facts

- name: Gather only organization info
  cisco.meraki_rm.meraki_facts:
    organization_id: "N_123456789012345678"
    gather_subset:
      - organizations

- name: Gather networks for a specific org
  cisco.meraki_rm.meraki_facts:
    organization_id: "N_123456789012345678"
    gather_subset:
      - networks

Return Values

ansible_facts
dict — returned: always
Gathered facts about Meraki resources.