.. _vyos.rest.vyos_route_maps_module: ************************* vyos.rest.vyos_route_maps ************************* **Manage route-map configuration on VyOS devices using REST API** Version added: 1.0.0 .. contents:: :local: :depth: 1 Synopsis -------- - Manages route maps on VyOS via the REST API. - Uses REST API (``connection=httpapi``) instead of CLI. Parameters ---------- .. raw:: html
Parameter Choices/Defaults Comments
config
list / elements=dictionary
List of route-map configurations.
entries
list / elements=dictionary
Route map rules.
action
string
Permit or deny.
call
string
Call another route map.
continue_sequence
integer
Continue at a different sequence number.
description
string
Rule description.
match
dictionary
Match conditions (passed through to VyOS API).
sequence
integer / required
Rule sequence number (1-65535).
set
dictionary
Route parameters to set (passed through to VyOS API).
route_map
string / required
Route map name.
state
string
    Choices:
  • merged ←
  • replaced
  • overridden
  • deleted
  • gathered
Desired state of the route-map configuration.
merged adds or updates entries without removing existing ones.
replaced replaces each named route map mentioned in config.
overridden replaces all route maps.
deleted removes route maps. Without config removes all.
gathered returns current configuration as structured data.

Notes ----- .. note:: - Requires ``ansible_connection=httpapi`` with the VyOS httpapi plugin. - ``ansible_network_os`` must be set to ``vyos.rest.vyos``. - Input validation is delegated to the VyOS API. Examples -------- .. code-block:: yaml - name: Merge route map configuration vyos.rest.vyos_route_maps: config: - route_map: RM-TEST-EXPORT-POLICY entries: - sequence: 10 action: permit match: peer: 192.0.2.32 set: metric: "5" as_path_exclude: "111" aggregator: as: 100 state: merged - name: Delete all route maps vyos.rest.vyos_route_maps: state: deleted - name: Delete a specific route map vyos.rest.vyos_route_maps: config: - route_map: RM-TEST-EXPORT-POLICY state: deleted - name: Gather current route map configuration vyos.rest.vyos_route_maps: state: gathered Return Values ------------- Common return values are documented `here `_, the following are the fields unique to this module: .. raw:: html
Key Returned Description
after
list
when changed
Route map configuration after this module ran.

before
list
always
Route map configuration before this module ran.

commands
list
always
List of API command tuples sent to the device.

gathered
list
when state is gathered
Current route map configuration as structured data.

response
dictionary
when changes are applied
Raw API response.

saved
boolean
when changes are applied
Whether the config was saved after changes.



Status ------ Authors ~~~~~~~ - VyOS Community (@vyos)