meraki_device
Manage devices in the Meraki cloud
Collection: cisco.meraki
Full Name: cisco.meraki.meraki_device
Controller module — runs on the local controller, not on remote hosts.
Synopsis
Manage devices in the Meraki cloud
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| auth_key | str | yes | ||
| host | str | api.meraki.com | ||
| use_proxy | bool | false | ||
| use_https | bool | true | ||
| validate_certs | bool | true | ||
| output_format | str | snakecase | ||
| output_level | str | normal | ||
| timeout | int | 30 | ||
| org_name | str | |||
| org_id | str | |||
| rate_limit_retry_time | int | 165 | ||
| internal_error_retry_time | int | 60 | ||
| state | str | query | ||
| net_name | str | |||
| net_id | str | |||
| serial | str | |||
| lldp_cdp_timespan | int | |||
| hostname | str | |||
| model | str | |||
| tags | list | |||
| lat | float | |||
| lng | float | |||
| address | str | |||
| move_map_marker | bool | |||
| note | str | |||
| query | str |
Example
yaml
- delegate_to: localhost
meraki_device:
auth_key: abc12345
org_name: YourOrg
state: query
name: Query all devices in an organization.
- delegate_to: localhost
meraki_device:
auth_key: abc12345
net_name: YourNet
org_name: YourOrg
state: query
name: Query all devices in a network.
- delegate_to: localhost
meraki_device:
auth_key: abc12345
net_name: YourNet
org_name: YourOrg
serial: ABC-123
state: query
name: Query a device by serial number.
- delegate_to: localhost
meraki_device:
auth_key: abc12345
net_name: YourNet
org_name: YourOrg
query: uplink
serial: ABC-123
state: query
name: Lookup uplink information about a device.
# Native example completion: the 60-second LLDP window is authored, not upstream.
- delegate_to: localhost
meraki_device:
auth_key: abc12345
lldp_cdp_timespan: 60
net_name: YourNet
org_name: YourOrg
query: lldp_cdp
serial: ABC-123
state: query
name: Lookup LLDP and CDP information about devices connected to specified device.
- delegate_to: localhost
meraki_device:
auth_key: abc12345
hostname: main-switch
net_name: YourNet
org_name: YourOrg
state: query
name: Lookup a device by hostname.
- delegate_to: localhost
meraki_device:
auth_key: abc123
model: MR26
net_name: YourNet
org_name: YourOrg
state: query
name: Query all devices of a specific model.
- delegate_to: localhost
meraki_device:
address: 1060 W. Addison St., Chicago, IL
auth_key: abc123
lat: 41.948038
lng: -87.65568
name: mr26
net_name: YourNet
org_name: YourOrg
serial: '{{ serial }}'
state: present
tags: recently-added
name: Update information about a device.
- delegate_to: localhost
meraki_device:
auth_key: abc123
net_name: YourNet
org_name: YourOrg
serial: ABC-123
state: present
name: Claim a device into a network.
- delegate_to: localhost
meraki_device:
auth_key: abc123
net_name: YourNet
org_name: YourOrg
serial: ABC-123
state: absent
name: Remove a device from a network.