ansible / ansible.builtin / v2.9.24 / module / meraki_static_route Manage static routes in the Meraki cloud | "added in version" 2.8 of ansible.builtin" Authors: Kevin Breit (@kbreit) preview | supported by communityansible.builtin.meraki_static_route (v2.9.24) — module
pip
Install with pip install ansible==2.9.24
Allows for creation, management, and visibility into static routes within Meraki.
- 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
host: default: api.meraki.com description: - Hostname for Meraki dashboard. - Can be used to access regional Meraki environments, such as China. type: str name: description: - Descriptive name of the static route. type: str state: choices: - absent - query - present default: present description: - Create or modify an organization. type: str net_id: description: - ID number of a network. type: str org_id: description: - ID of organization. type: str subnet: description: - CIDR notation based subnet for static route. type: str enabled: description: - Indicates whether static route is enabled within a network. type: bool timeout: default: 30 description: - Time to timeout for HTTP requests. type: int auth_key: description: - Authentication key provided by the dashboard. Required if environmental variable C(MERAKI_KEY) is not set. required: true type: str net_name: description: - Name of a network. type: str org_name: aliases: - organization description: - Name of organization. type: str route_id: description: - Unique ID of static route. type: str use_https: default: true description: - If C(no), it will use HTTP. Otherwise it will use HTTPS. - Only useful for internal Meraki developers. type: bool use_proxy: default: false description: - If C(no), it will not use a proxy, even if one is defined in an environment variable on the target hosts. type: bool gateway_ip: description: - IP address of the gateway for the subnet. type: str output_level: choices: - debug - normal default: normal description: - Set amount of debug output during module execution. type: str output_format: choices: - snakecase - camelcase default: snakecase description: - Instructs module whether response keys should be snake case (ex. C(net_id)) or camel case (ex. C(netId)). type: str validate_certs: default: true description: - Whether to validate HTTP certificates. type: bool reserved_ip_ranges: description: - List of IP ranges reserved for static IP assignments. suboptions: comment: description: - Human readable description of reservation range. type: str end: description: - Last IP address of reserved range. type: str start: description: - First IP address of reserved range. type: str type: list fixed_ip_assignments: description: - List of fixed MAC to IP bindings for DHCP. suboptions: ip: description: - IP address of endpoint. type: str mac: description: - MAC address of endpoint. type: str name: description: - Hostname of endpoint. type: str type: list rate_limit_retry_time: default: 165 description: - Number of seconds to retry if rate limiter is triggered. type: int internal_error_retry_time: default: 60 description: - Number of seconds to retry if server returns an internal server error. type: int
data: contains: enabled: description: Enabled state of static route. returned: query or update sample: true type: bool fixedIpAssignments: contains: mac: contains: ip: description: IP address to be bound to the endpoint. returned: query or update sample: 192.0.1.11 type: str name: description: Hostname given to the endpoint. returned: query or update sample: JimLaptop type: str description: Key is MAC address of endpoint. returned: query or update type: complex description: List of static MAC to IP address bindings. returned: query or update type: complex gatewayIp: description: Next hop IP address. returned: success sample: 192.1.1.1 type: str id: description: Unique identification string assigned to each static route. returned: success sample: d6fa4821-1234-4dfa-af6b-ae8b16c20c39 type: str name: description: Name of static route. returned: success sample: Data Center static route type: str net_id: description: Identification string of network. returned: query or update sample: N_12345 type: str reservedIpRanges: contains: comment: description: Human readable description of range. returned: query or update sample: Server range type: str end: description: Last address in reservation range, inclusive. returned: query or update sample: 192.0.1.10 type: str start: description: First address in reservation range, inclusive. returned: query or update sample: 192.0.1.2 type: str description: List of IP address ranges which are reserved for static assignment. returned: query or update type: complex subnet: description: CIDR notation subnet for static route. returned: success sample: 192.0.1.0/24 type: str description: Information about the created or manipulated object. returned: info type: complex