To gather information about your servers, such as IP, network, name, model, MAC address, and other data using Ansible, you can use the cisco.meraki.networks module. This module is part of the cisco.meraki collection and allows you to manage operations like creating, updating, and deleting networks within the Meraki environment.
Here’s an example of how you can use the module in an Ansible playbook:
- name: Get Meraki network information
cisco.meraki.networks:
auth_key: your_meraki_auth_key
state: query
org_name: your_organization_name
net_name: your_network_name
delegate_to: localhost
Make sure to replace your_meraki_auth_key, your_organization_name, and your_network_name with your actual data. This playbook will query and return information about the specified network.
For more details and configuration options, you can refer to the official documentation of the cisco.meraki.networks module. Remember that you’ll need to have the cisco.meraki collection installed to use this module. If you haven’t installed it yet, you can do so with the following command:
ansible-galaxy collection install cisco.meraki
I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.
Please, if this post was useful, leave your kudos and mark it as solved.