cisco.meraki.meraki_mx_static_route module – Manage static routes in the Meraki cloud
Note
This module is part of the cisco.meraki collection (version 2.15.1).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install cisco.meraki
.
To use it in a playbook, specify: cisco.meraki.meraki_mx_static_route
.
Synopsis
Allows for creation, management, and visibility into static routes within Meraki.
Parameters
Parameter |
Comments |
---|---|
Authentication key provided by the dashboard. Required if environmental variable |
|
Indicates whether static route is enabled within a network. Choices:
|
|
List of fixed MAC to IP bindings for DHCP. |
|
IP address of endpoint. |
|
MAC address of endpoint. |
|
Hostname of endpoint. |
|
IP address of the gateway for the subnet. |
|
The gateway IP (next hop) VLAN ID of the static route. |
|
Hostname for Meraki dashboard. Can be used to access regional Meraki environments, such as China. Default: |
|
Number of seconds to retry if server returns an internal server error. Default: |
|
Descriptive name of the static route. |
|
ID number of a network. |
|
Name of a network. |
|
ID of organization. |
|
Name of organization. |
|
Instructs module whether response keys should be snake case (ex. Choices:
|
|
Set amount of debug output during module execution. Choices:
|
|
Number of seconds to retry if rate limiter is triggered. Default: |
|
List of IP ranges reserved for static IP assignments. |
|
Human readable description of reservation range. |
|
Last IP address of reserved range. |
|
First IP address of reserved range. |
|
Unique ID of static route. |
|
Create or modify an organization. Choices:
|
|
CIDR notation based subnet for static route. |
|
Time to timeout for HTTP requests. Default: |
|
If Only useful for internal Meraki developers. Choices:
|
|
If Choices:
|
|
Whether to validate HTTP certificates. Choices:
|
Notes
Note
More information about the Meraki API can be found at https://dashboard.meraki.com/api_docs.
Some of the options are likely only used for developers within Meraki.
As of Ansible 2.9, Meraki modules output keys as snake case. To use camel case, set the
ANSIBLE_MERAKI_FORMAT
environment variable tocamelcase
.Ansible’s Meraki modules will stop supporting camel case output in Ansible 2.13. Please update your playbooks.
Check Mode downloads the current configuration from the dashboard, then compares changes against this download. Check Mode will report changed if there are differences in the configurations, but does not submit changes to the API for validation of change.
Examples
- name: Create static_route
meraki_static_route:
auth_key: abc123
state: present
org_name: YourOrg
net_name: YourNet
name: Test Route
subnet: 192.0.1.0/24
gateway_ip: 192.168.128.1
delegate_to: localhost
- name: Update static route with fixed IP assignment
meraki_static_route:
auth_key: abc123
state: present
org_name: YourOrg
net_name: YourNet
route_id: d6fa4821-1234-4dfa-af6b-ae8b16c20c39
fixed_ip_assignments:
- mac: aa:bb:cc:dd:ee:ff
ip: 192.0.1.11
comment: Server
delegate_to: localhost
- name: Query static routes
meraki_static_route:
auth_key: abc123
state: query
org_name: YourOrg
net_name: YourNet
delegate_to: localhost
- name: Delete static routes
meraki_static_route:
auth_key: abc123
state: absent
org_name: YourOrg
net_name: YourNet
route_id: '{{item}}'
delegate_to: localhost
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Information about the created or manipulated object. Returned: info |
|
Enabled state of static route. Returned: query or update Sample: |
|
List of static MAC to IP address bindings. Returned: query or update |
|
Key is MAC address of endpoint. Returned: query or update |
|
IP address to be bound to the endpoint. Returned: query or update Sample: |
|
Hostname given to the endpoint. Returned: query or update Sample: |
|
Next hop IP address. Returned: success Sample: |
|
Unique identification string assigned to each static route. Returned: success Sample: |
|
Name of static route. Returned: success Sample: |
|
Identification string of network. Returned: query or update Sample: |
|
List of IP address ranges which are reserved for static assignment. Returned: query or update |
|
Human readable description of range. Returned: query or update Sample: |
|
Last address in reservation range, inclusive. Returned: query or update Sample: |
|
First address in reservation range, inclusive. Returned: query or update Sample: |
|
CIDR notation subnet for static route. Returned: success Sample: |