Note
This module is part of the cisco.meraki collection (version 2.21.4).
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.
version 3.0.0
Updated modules released with increased functionality
cisco.meraki.networks_appliance_static_routes
Parameter | Comments |
|---|---|
auth_key string / required | Authentication key provided by the dashboard. Required if environmental variable |
enabled boolean | Indicates whether static route is enabled within a network. Choices:
|
fixed_ip_assignments list / elements=dictionary | List of fixed MAC to IP bindings for DHCP. |
|
ip string |
IP address of endpoint. |
|
mac string |
MAC address of endpoint. |
|
name string |
Hostname of endpoint. |
gateway_ip string | IP address of the gateway for the subnet. |
gateway_vlan_id integer | The gateway IP (next hop) VLAN ID of the static route. |
host string | Hostname for Meraki dashboard. Can be used to access regional Meraki environments, such as China. Default: |
internal_error_retry_time integer | Number of seconds to retry if server returns an internal server error. Default: |
name string | Descriptive name of the static route. |
net_id string | ID number of a network. |
net_name string | Name of a network. |
org_id string | ID of organization. |
org_name aliases: organization string | Name of organization. |
output_format string | Instructs module whether response keys should be snake case (ex. Choices:
|
output_level string | Set amount of debug output during module execution. Choices:
|
rate_limit_retry_time integer | Number of seconds to retry if rate limiter is triggered. Default: |
reserved_ip_ranges list / elements=dictionary | List of IP ranges reserved for static IP assignments. |
|
comment string |
Human readable description of reservation range. |
|
end string |
Last IP address of reserved range. |
|
start string |
First IP address of reserved range. |
route_id string | Unique ID of static route. |
state string | Create or modify an organization. Choices:
|
subnet string | CIDR notation based subnet for static route. |
timeout integer | Time to timeout for HTTP requests. Default: |
use_https boolean | If Only useful for internal Meraki developers. Choices:
|
use_proxy boolean | If Choices:
|
validate_certs boolean | Whether to validate HTTP certificates. Choices:
|
Note
ANSIBLE_MERAKI_FORMAT environment variable to camelcase.- 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
Common return values are documented here, the following are the fields unique to this module:
Key | Description |
|---|---|
data complex | Information about the created or manipulated object. Returned: info |
|
enabled boolean |
Enabled state of static route. Returned: query or update Sample: |
|
fixedIpAssignments complex |
List of static MAC to IP address bindings. Returned: query or update |
|
mac complex |
Key is MAC address of endpoint. Returned: query or update |
|
ip string |
IP address to be bound to the endpoint. Returned: query or update Sample: |
|
name string |
Hostname given to the endpoint. Returned: query or update Sample: |
|
gatewayIp string |
Next hop IP address. Returned: success Sample: |
|
id string |
Unique identification string assigned to each static route. Returned: success Sample: |
|
name string |
Name of static route. Returned: success Sample: |
|
net_id string |
Identification string of network. Returned: query or update Sample: |
|
reservedIpRanges complex |
List of IP address ranges which are reserved for static assignment. Returned: query or update |
|
comment string |
Human readable description of range. Returned: query or update Sample: |
|
end string |
Last address in reservation range, inclusive. Returned: query or update Sample: |
|
start string |
First address in reservation range, inclusive. Returned: query or update Sample: |
|
subnet string |
CIDR notation subnet for static route. Returned: success Sample: |
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/cisco/meraki/meraki_mx_static_route_module.html