meraki_static_route – Manage static routes in the Meraki cloud
New in version 2.8.
Synopsis
- Allows for creation, management, and visibility into static routes within Meraki.
Parameters
| Parameter | Choices/Defaults | Comments | |
|---|---|---|---|
| auth_key string | Authentication key provided by the dashboard. Required if environmental variable MERAKI_KEY is not set. | ||
| enabled boolean |
| Indicates whether static route is enabled within a network. | |
| fixed_ip_assignments list | 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. | ||
| host string | Default: "api.meraki.com" | Hostname for Meraki dashboard. Can be used to access regional Meraki environments, such as China. | |
| 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 associated to a network. | ||
| org_name string | Name of organization associated to a network. aliases: organization | ||
| output_level string |
| Set amount of debug output during module execution. | |
| reserved_ip_ranges list | 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. | |
| subnet string | CIDR notation based subnet for static route. | ||
| timeout integer | Default: 30 | Time to timeout for HTTP requests. | |
| use_https boolean |
| If no, it will use HTTP. Otherwise it will use HTTPS.Only useful for internal Meraki developers. | |
| use_proxy boolean |
| If no, it will not use a proxy, even if one is defined in an environment variable on the target hosts. | |
| validate_certs boolean |
| Whether to validate HTTP certificates. | |
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.
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 | Returned | Description | |||
|---|---|---|---|---|---|
| data complex | info | Information about the created or manipulated object. | |||
| enabled boolean | query or update | Enabled state of static route. Sample: True | |||
| fixedIpAssignments complex | query or update | List of static MAC to IP address bindings. | |||
| mac complex | query or update | Key is MAC address of endpoint. | |||
| ip string | query or update | IP address to be bound to the endpoint. Sample: 192.0.1.11 | |||
| name string | query or update | Hostname given to the endpoint. Sample: JimLaptop | |||
| gatewayIp string | success | Next hop IP address. Sample: 192.1.1.1 | |||
| id string | success | Unique identification string assigned to each static route. Sample: d6fa4821-1234-4dfa-af6b-ae8b16c20c39 | |||
| name string | success | Name of static route. Sample: Data Center static route | |||
| net_id string | query or update | Identification string of network. Sample: N_12345 | |||
| reservedIpRanges complex | query or update | List of IP address ranges which are reserved for static assignment. | |||
| comment string | query or update | Human readable description of range. Sample: Server range | |||
| end string | query or update | Last address in reservation range, inclusive. Sample: 192.0.1.10 | |||
| start string | query or update | First address in reservation range, inclusive. Sample: 192.0.1.2 | |||
| subnet string | success | CIDR notation subnet for static route. Sample: 192.0.1.0/24 | |||
Status
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]
Authors
- Kevin Breit (@kbreit)
Hint
If you notice any issues in this documentation you can edit this document to improve it.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.8/modules/meraki_static_route_module.html