From ecc84b8d9b74d5c45ee073c6c4cd603cfbf05406 Mon Sep 17 00:00:00 2001 From: omnom62 Date: Fri, 4 Sep 2026 13:24:44 +1000 Subject: T8989: new auth methods --- docs/vyos.rest.vyos_banner_module.rst | 348 ---- docs/vyos.rest.vyos_bgp_address_family_module.rst | 1024 ------------ docs/vyos.rest.vyos_bgp_global_module.rst | 876 ---------- docs/vyos.rest.vyos_command_module.rst | 252 --- docs/vyos.rest.vyos_config_module.rst | 228 --- docs/vyos.rest.vyos_configure_module.rst | 168 -- docs/vyos.rest.vyos_facts_module.rst | 296 ---- docs/vyos.rest.vyos_firewall_global_module.rst | 642 -------- docs/vyos.rest.vyos_firewall_interfaces_module.rst | 632 -------- docs/vyos.rest.vyos_firewall_rules_module.rst | 726 --------- docs/vyos.rest.vyos_ha_module.rst | 1668 -------------------- docs/vyos.rest.vyos_hostname_module.rst | 370 ----- docs/vyos.rest.vyos_httpapi.rst | 81 - docs/vyos.rest.vyos_interfaces_module.rst | 356 ----- docs/vyos.rest.vyos_l3_interfaces_module.rst | 494 ------ docs/vyos.rest.vyos_lag_interfaces_module.rst | 448 ------ docs/vyos.rest.vyos_lldp_global_module.rst | 279 ---- docs/vyos.rest.vyos_lldp_interfaces_module.rst | 470 ------ docs/vyos.rest.vyos_logging_global_module.rst | 635 -------- docs/vyos.rest.vyos_nat_module.rst | 208 --- docs/vyos.rest.vyos_ntp_global_module.rst | 322 ---- docs/vyos.rest.vyos_ospf_interfaces_module.rst | 612 ------- docs/vyos.rest.vyos_ospfv2_module.rst | 1263 --------------- docs/vyos.rest.vyos_ospfv3_module.rst | 480 ------ docs/vyos.rest.vyos_prefix_lists_module.rst | 454 ------ docs/vyos.rest.vyos_route_maps_module.rst | 1288 --------------- docs/vyos.rest.vyos_snmp_server_module.rst | 1242 --------------- docs/vyos.rest.vyos_static_routes_module.rst | 429 ----- docs/vyos.rest.vyos_system_module.rst | 254 --- docs/vyos.rest.vyos_user_module.rst | 393 ----- docs/vyos.rest.vyos_vlan_module.rst | 303 ---- 31 files changed, 17241 deletions(-) delete mode 100644 docs/vyos.rest.vyos_banner_module.rst delete mode 100644 docs/vyos.rest.vyos_bgp_address_family_module.rst delete mode 100644 docs/vyos.rest.vyos_bgp_global_module.rst delete mode 100644 docs/vyos.rest.vyos_command_module.rst delete mode 100644 docs/vyos.rest.vyos_config_module.rst delete mode 100644 docs/vyos.rest.vyos_configure_module.rst delete mode 100644 docs/vyos.rest.vyos_facts_module.rst delete mode 100644 docs/vyos.rest.vyos_firewall_global_module.rst delete mode 100644 docs/vyos.rest.vyos_firewall_interfaces_module.rst delete mode 100644 docs/vyos.rest.vyos_firewall_rules_module.rst delete mode 100644 docs/vyos.rest.vyos_ha_module.rst delete mode 100644 docs/vyos.rest.vyos_hostname_module.rst delete mode 100644 docs/vyos.rest.vyos_httpapi.rst delete mode 100644 docs/vyos.rest.vyos_interfaces_module.rst delete mode 100644 docs/vyos.rest.vyos_l3_interfaces_module.rst delete mode 100644 docs/vyos.rest.vyos_lag_interfaces_module.rst delete mode 100644 docs/vyos.rest.vyos_lldp_global_module.rst delete mode 100644 docs/vyos.rest.vyos_lldp_interfaces_module.rst delete mode 100644 docs/vyos.rest.vyos_logging_global_module.rst delete mode 100644 docs/vyos.rest.vyos_nat_module.rst delete mode 100644 docs/vyos.rest.vyos_ntp_global_module.rst delete mode 100644 docs/vyos.rest.vyos_ospf_interfaces_module.rst delete mode 100644 docs/vyos.rest.vyos_ospfv2_module.rst delete mode 100644 docs/vyos.rest.vyos_ospfv3_module.rst delete mode 100644 docs/vyos.rest.vyos_prefix_lists_module.rst delete mode 100644 docs/vyos.rest.vyos_route_maps_module.rst delete mode 100644 docs/vyos.rest.vyos_snmp_server_module.rst delete mode 100644 docs/vyos.rest.vyos_static_routes_module.rst delete mode 100644 docs/vyos.rest.vyos_system_module.rst delete mode 100644 docs/vyos.rest.vyos_user_module.rst delete mode 100644 docs/vyos.rest.vyos_vlan_module.rst (limited to 'docs') diff --git a/docs/vyos.rest.vyos_banner_module.rst b/docs/vyos.rest.vyos_banner_module.rst deleted file mode 100644 index 4e0e3ab..0000000 --- a/docs/vyos.rest.vyos_banner_module.rst +++ /dev/null @@ -1,348 +0,0 @@ -.. _vyos.rest.vyos_banner_module: - - -********************* -vyos.rest.vyos_banner -********************* - -**Manage multiline banners on VyOS devices via REST API.** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manages pre-login and post-login banners on VyOS devices using the HTTPS REST API. -- Works with ``ansible_connection=ansible.netcommon.httpapi`` (recommended) or with direct ``hostname``/``api_key`` task parameters. -- VyOS stores banner newlines as literal ``\n`` in its config; this module handles that conversion automatically. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- api_key - -
- string -
-
- -
REST API key (not needed when ansible_httpapi_api_key is set).
-
-
- config - -
- dictionary -
-
- -
Banner configuration.
-
-
- banner - -
- string -
-
-
    Choices: -
  • pre-login
  • -
  • post-login
  • -
-
-
Which banner to configure.
-
-
- text - -
- string -
-
- -
The banner text. Required when state=merged or state=replaced.
-
Use a YAML block scalar (|) for multi-line banners.
-
Real newline characters are converted to the \n escape sequence that VyOS stores internally; this is transparent to the user.
-
-
- hostname - -
- string -
-
- -
Device IP or FQDN (not needed with httpapi inventory).
-
-
- port - -
- integer -
-
- Default:
443
-
-
HTTPS port (local mode only).
-
-
- state - -
- string -
-
-
    Choices: -
  • merged ←
  • -
  • replaced
  • -
  • deleted
  • -
  • gathered
  • -
-
-
Desired state of the banner configuration.
-
merged - set the banner if it differs from the current value.
-
replaced - replace the banner text unconditionally.
-
deleted - remove the banner. If config.banner is omitted, both pre-login and post-login banners are removed.
-
gathered - return the current banner in gathered without making any changes. If config.banner is omitted, all banners are returned.
-
-
- timeout - -
- integer -
-
- Default:
30
-
-
Request timeout in seconds.
-
-
- verify_ssl - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Validate the device TLS certificate.
-
-
- - - -See Also --------- - -.. seealso:: - - :ref:`vyos.vyos.vyos_banner_module` - The official documentation on the **vyos.vyos.vyos_banner** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Set pre-login banner (merged — only changes if different) - vyos.rest.vyos_banner: - config: - banner: pre-login - text: | - Junk pre-login banner - over multiple lines - state: merged - - - name: Replace post-login banner unconditionally - vyos.rest.vyos_banner: - config: - banner: post-login - text: "Welcome. Authorised access only." - state: replaced - - - name: Remove pre-login banner only - vyos.rest.vyos_banner: - config: - banner: pre-login - state: deleted - - - name: Remove all banners - vyos.rest.vyos_banner: - state: deleted - - - name: Read current pre-login banner without changing it - vyos.rest.vyos_banner: - config: - banner: pre-login - state: gathered - register: result - - - name: Read all banners - vyos.rest.vyos_banner: - state: gathered - register: result - - - name: Print gathered banner - ansible.builtin.debug: - msg: "Current banner: {{ result.gathered.text }}" - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- after - -
- dictionary -
-
when changed -
Banner configuration after the module ran.
-
-
-
- before - -
- dictionary -
-
always -
Banner configuration before the module ran.
-
-
Sample:
-
{'banner': 'pre-login', 'text': 'Old banner text\nline two\n'}
-
-
- commands - -
- list -
-
always -
Configuration commands issued.
-
-
-
- gathered - -
- dictionary -
-
when state is gathered -
Current banner configuration read from the device (state=gathered).
-
-
Sample:
-
{'banner': 'pre-login', 'text': 'Current banner\nline two\n'}
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- VyOS Community (@vyos) diff --git a/docs/vyos.rest.vyos_bgp_address_family_module.rst b/docs/vyos.rest.vyos_bgp_address_family_module.rst deleted file mode 100644 index f55fa15..0000000 --- a/docs/vyos.rest.vyos_bgp_address_family_module.rst +++ /dev/null @@ -1,1024 +0,0 @@ -.. _vyos.rest.vyos_bgp_address_family_module: - - -********************************* -vyos.rest.vyos_bgp_address_family -********************************* - -**Manage BGP address-family configuration on VyOS devices using REST API** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manages BGP address-family configuration on VyOS devices via the REST API. -- Covers global address-family (networks, redistribution) and per-neighbor address-family settings. -- BGP must be configured first using :ref:`vyos.rest.vyos_bgp_global `. -- Uses REST API (``connection=httpapi``) instead of CLI. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- config - -
- dictionary -
-
- -
BGP address-family configuration.
-
-
- address_family - -
- list - / elements=dictionary -
-
- -
Global BGP address-family settings.
-
-
- afi - -
- string - / required -
-
-
    Choices: -
  • ipv4
  • -
  • ipv6
  • -
-
-
Address family identifier.
-
-
- networks - -
- list - / elements=dictionary -
-
- -
Networks to advertise.
-
-
- backdoor - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Network backdoor.
-
-
- prefix - -
- string - / required -
-
- -
Network prefix.
-
-
- route_map - -
- string -
-
- -
Route map to apply.
-
-
- redistribute - -
- list - / elements=dictionary -
-
- -
Redistribute routes from other protocols.
-
-
- metric - -
- integer -
-
- -
Metric for redistributed routes.
-
-
- protocol - -
- string - / required -
-
-
    Choices: -
  • connected
  • -
  • kernel
  • -
  • ospf
  • -
  • ospfv3
  • -
  • rip
  • -
  • ripng
  • -
  • static
  • -
-
-
Protocol to redistribute.
-
-
- route_map - -
- string -
-
- -
Route map to apply.
-
-
- as_number - -
- integer - / required -
-
- -
BGP autonomous system number (required for context).
-
-
- neighbors - -
- list - / elements=dictionary -
-
- -
Per-neighbor address-family settings.
-
-
- address_family - -
- list - / elements=dictionary -
-
- -
Address-family settings for this neighbor.
-
-
- afi - -
- string - / required -
-
-
    Choices: -
  • ipv4
  • -
  • ipv6
  • -
-
-
Address family identifier.
-
-
- allowas_in - -
- integer -
-
- -
Accept as-path with my AS present.
-
-
- attribute_unchanged - -
- dictionary -
-
- -
BGP attributes to leave unchanged.
-
-
- as_path - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Leave as-path unchanged.
-
-
- med - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Leave MED unchanged.
-
-
- next_hop - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Leave next-hop unchanged.
-
-
- capability - -
- dictionary -
-
- -
Advertise capability to the peer.
-
-
- orf - -
- string -
-
-
    Choices: -
  • receive
  • -
  • send
  • -
-
-
ORF capability.
-
-
- default_originate - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Send default route to neighbor.
-
-
- distribute_list - -
- dictionary -
-
- -
Filter updates using access-list.
-
-
- export - -
- integer -
-
- -
Access-list to filter outbound updates.
-
-
- import - -
- integer -
-
- -
Access-list to filter inbound updates.
-
-
- maximum_prefix - -
- integer -
-
- -
Maximum number of prefixes to accept.
-
-
- nexthop_self - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Set next-hop to self.
-
-
- prefix_list - -
- dictionary -
-
- -
Filter updates using prefix-list.
-
-
- export - -
- string -
-
- -
Prefix-list to filter outbound updates.
-
-
- import - -
- string -
-
- -
Prefix-list to filter inbound updates.
-
-
- route_map - -
- dictionary -
-
- -
Route map to apply.
-
-
- export - -
- string -
-
- -
Route map for outbound updates.
-
-
- import - -
- string -
-
- -
Route map for inbound updates.
-
-
- route_reflector_client - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Configure as route reflector client.
-
-
- route_server_client - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Configure as route server client.
-
-
- soft_reconfiguration - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Enable soft reconfiguration inbound.
-
-
- unsuppress_map - -
- string -
-
- -
Route-map to selectively unsuppress suppressed routes.
-
-
- weight - -
- integer -
-
- -
Default weight for routes from this neighbor.
-
-
- neighbor_address - -
- string - / required -
-
- -
Neighbor IP address.
-
-
- state - -
- string -
-
-
    Choices: -
  • merged ←
  • -
  • replaced
  • -
  • deleted
  • -
  • gathered
  • -
-
-
Desired state of the BGP address-family configuration.
-
merged adds or updates without removing existing config.
-
replaced replaces the entire BGP address-family configuration.
-
deleted removes BGP address-family configuration.
-
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``. - - BGP must be configured first using :ref:`vyos.rest.vyos_bgp_global `. - - - -Examples --------- - -.. code-block:: yaml - - - name: Merge BGP address-family configuration - vyos.rest.vyos_bgp_address_family: - config: - as_number: 65000 - address_family: - - afi: ipv4 - networks: - - prefix: 192.0.2.0/24 - redistribute: - - protocol: connected - metric: 10 - neighbors: - - neighbor_address: 192.0.2.1 - address_family: - - afi: ipv4 - soft_reconfiguration: true - nexthop_self: true - - afi: ipv6 - soft_reconfiguration: true - state: merged - - - name: Delete all BGP address-family configuration - vyos.rest.vyos_bgp_address_family: - config: - as_number: 65000 - state: deleted - - - name: Gather BGP address-family configuration - vyos.rest.vyos_bgp_address_family: - state: gathered - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- after - -
- dictionary -
-
when changed -
BGP address-family configuration after this module ran.
-
-
-
- before - -
- dictionary -
-
always -
BGP address-family configuration before this module ran.
-
-
-
- commands - -
- list -
-
always -
List of API command tuples sent to the device.
-
-
-
- gathered - -
- dictionary -
-
when state is gathered -
Current BGP address-family configuration as structured data.
-
-
-
- response - -
- dictionary -
-
always -
Raw API response.
-
-
-
- saved - -
- boolean -
-
when changed -
Whether the config was saved after changes.
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- VyOS Community (@vyos) diff --git a/docs/vyos.rest.vyos_bgp_global_module.rst b/docs/vyos.rest.vyos_bgp_global_module.rst deleted file mode 100644 index db5a759..0000000 --- a/docs/vyos.rest.vyos_bgp_global_module.rst +++ /dev/null @@ -1,876 +0,0 @@ -.. _vyos.rest.vyos_bgp_global_module: - - -************************* -vyos.rest.vyos_bgp_global -************************* - -**Manage BGP global configuration on VyOS devices using REST API** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manages BGP global configuration on VyOS devices via the REST API. -- Covers system AS, parameters, neighbors, and peer-groups. -- For per-neighbor address-family configuration use :ref:`vyos.rest.vyos_bgp_address_family `. -- Uses REST API (``connection=httpapi``) instead of CLI. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- config - -
- dictionary -
-
- -
BGP global configuration.
-
-
- as_number - -
- integer - / required -
-
- -
BGP autonomous system number.
-
-
- neighbors - -
- list - / elements=dictionary -
-
- -
BGP neighbors.
-
-
- description - -
- string -
-
- -
Neighbor description.
-
-
- disable_connected_check - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Disable connected route check.
-
-
- ebgp_multihop - -
- integer -
-
- -
EBGP multihop TTL.
-
-
- local_as - -
- integer -
-
- -
Local AS number.
-
-
- neighbor_address - -
- string - / required -
-
- -
Neighbor IP address.
-
-
- password - -
- string -
-
- -
MD5 password for neighbor.
-
-
- peer_group - -
- string -
-
- -
Peer group name.
-
-
- remote_as - -
- integer -
-
- -
Neighbor AS number.
-
-
- shutdown - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Shutdown neighbor.
-
-
- timers - -
- dictionary -
-
- -
Neighbor timers.
-
-
- holdtime - -
- integer -
-
- -
Hold time in seconds.
-
-
- keepalive - -
- integer -
-
- -
Keepalive interval in seconds.
-
-
- update_source - -
- string -
-
- -
Source interface/IP for updates.
-
-
- parameters - -
- dictionary -
-
- -
BGP global parameters.
-
-
- bestpath - -
- dictionary -
-
- -
BGP bestpath parameters.
-
-
- as_path - -
- string -
-
-
    Choices: -
  • confed
  • -
  • ignore
  • -
  • multipath-relax
  • -
-
-
AS-path attribute comparison.
-
-
- confederation - -
- dictionary -
-
- -
AS confederation parameters.
-
-
- identifier - -
- integer -
-
- -
Confederation AS identifier.
-
-
- peers - -
- list - / elements=integer -
-
- -
Peer ASs in confederation.
-
-
- graceful_restart - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Enable graceful restart.
-
-
- log_neighbor_changes - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Log neighbor up/down changes.
-
-
- no_ipv4_unicast - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Disable IPv4 unicast default.
-
-
- router_id - -
- string -
-
- -
BGP router ID.
-
-
- peer_groups - -
- list - / elements=dictionary -
-
- -
BGP peer groups.
-
-
- description - -
- string -
-
- -
Peer group description.
-
-
- ebgp_multihop - -
- integer -
-
- -
EBGP multihop TTL.
-
-
- password - -
- string -
-
- -
MD5 password.
-
-
- peer_group - -
- string - / required -
-
- -
Peer group name.
-
-
- remote_as - -
- integer -
-
- -
Peer group AS number.
-
-
- timers - -
- dictionary -
-
- -
Peer group timers.
-
-
- holdtime - -
- integer -
-
- -
Hold time in seconds.
-
-
- keepalive - -
- integer -
-
- -
Keepalive interval in seconds.
-
-
- update_source - -
- string -
-
- -
Source interface/IP for updates.
-
-
- state - -
- string -
-
-
    Choices: -
  • merged ←
  • -
  • replaced
  • -
  • deleted
  • -
  • gathered
  • -
-
-
Desired state of the BGP global configuration.
-
merged adds or updates without removing existing config.
-
replaced replaces the entire BGP configuration.
-
deleted removes BGP configuration.
-
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``. - - BGP system-as must be defined before any other BGP configuration. - - - -Examples --------- - -.. code-block:: yaml - - - name: Merge BGP global configuration - vyos.rest.vyos_bgp_global: - config: - as_number: 65000 - parameters: - router_id: 192.0.1.1 - neighbors: - - neighbor_address: 192.0.2.1 - remote_as: 65001 - description: peer1 - timers: - holdtime: 30 - keepalive: 10 - peer_groups: - - peer_group: PG1 - remote_as: 65002 - state: merged - - - name: Delete BGP configuration - vyos.rest.vyos_bgp_global: - state: deleted - - - name: Gather BGP global configuration - vyos.rest.vyos_bgp_global: - state: gathered - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- after - -
- dictionary -
-
when changed -
BGP configuration after this module ran.
-
-
-
- before - -
- dictionary -
-
always -
BGP configuration before this module ran.
-
-
-
- commands - -
- list -
-
always -
List of API command tuples sent to the device.
-
-
-
- gathered - -
- dictionary -
-
when state is gathered -
Current BGP configuration as structured data.
-
-
-
- response - -
- dictionary -
-
always -
Raw API response.
-
-
-
- saved - -
- boolean -
-
when changed -
Whether the config was saved after changes.
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- VyOS Community (@vyos) diff --git a/docs/vyos.rest.vyos_command_module.rst b/docs/vyos.rest.vyos_command_module.rst deleted file mode 100644 index 7075ec6..0000000 --- a/docs/vyos.rest.vyos_command_module.rst +++ /dev/null @@ -1,252 +0,0 @@ -.. _vyos.rest.vyos_command_module: - - -********************** -vyos.rest.vyos_command -********************** - -**Run show commands on VyOS devices using REST API** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Sends show commands to VyOS devices via the REST API ``/show`` endpoint and returns the output. -- Equivalent to ``vyos_command`` in the CLI collection but uses the REST API. -- Uses REST API (``connection=httpapi``) instead of CLI. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- commands - -
- list - / elements=raw - / required -
-
- -
List of show commands to run on the device.
-
Each command is a list of path elements passed to the /show endpoint.
-
Commands may be specified as a string (space-separated) or a list.
-
-
- interval - -
- integer -
-
- Default:
1
-
-
Configures the interval in seconds to wait between retries of the command.
-
-
- match - -
- string -
-
-
    Choices: -
  • any
  • -
  • all ←
  • -
-
-
The match argument is used in conjunction with the wait_for argument to specify the match policy.
-
-
- retries - -
- integer -
-
- Default:
10
-
-
Specifies the number of retries a command should be run before it is considered failed.
-
-
- wait_for - -
- list - / elements=string -
-
- -
Specifies what to evaluate from the output of the command and what conditionals to apply. This argument will cause the task to wait for a particular conditional to be true before moving forward.
-

aliases: waitfor
-
-
- - -Notes ------ - -.. note:: - - Requires ``ansible_connection=httpapi`` with the VyOS httpapi plugin. - - ``ansible_network_os`` must be set to ``vyos.rest.vyos``. - - Only ``show`` commands are supported via the REST API. - - Commands are passed as path lists to the ``/show`` endpoint. - - - -Examples --------- - -.. code-block:: yaml - - - name: Run show version - vyos.rest.vyos_command: - commands: - - - version - register: result - - - name: Run multiple show commands - vyos.rest.vyos_command: - commands: - - - interfaces - - - ip - - route - - - system - - uptime - register: result - - - name: Run show commands as strings - vyos.rest.vyos_command: - commands: - - "interfaces" - - "ip route" - - "version" - register: result - - - name: Wait for BGP to establish - vyos.rest.vyos_command: - commands: - - - ip - - bgp - - summary - wait_for: - - result[0] contains Established - retries: 10 - interval: 5 - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- failed_conditions - -
- list -
-
failed -
List of conditions that failed.
-
-
-
- stdout - -
- list -
-
always -
List of output from each command.
-
-
Sample:
-
['VyOS 1.5.0\n...', 'Interface IP Address\n...']
-
-
- stdout_lines - -
- list -
-
always -
List of output split into lines for each command.
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- VyOS Community (@vyos) diff --git a/docs/vyos.rest.vyos_config_module.rst b/docs/vyos.rest.vyos_config_module.rst deleted file mode 100644 index 9753ba3..0000000 --- a/docs/vyos.rest.vyos_config_module.rst +++ /dev/null @@ -1,228 +0,0 @@ -.. _vyos.rest.vyos_config_module: - - -********************* -vyos.rest.vyos_config -********************* - -**Manage VyOS configuration using REST API** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manages VyOS device configuration via the REST API. -- Accepts configuration commands in CLI ``set``/``delete`` string format and applies them via the REST ``/configure`` endpoint. -- Uses REST API (``connection=httpapi``) instead of CLI. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- lines - -
- list - / elements=string -
-
- -
Ordered list of set or delete commands to apply.
-
Commands should be in standard VyOS CLI format, e.g. set system host-name router1 or delete protocols bgp.
-
-
- match - -
- string -
-
-
    Choices: -
  • line ←
  • -
  • none
  • -
-
-
Controls how commands are matched against the running configuration.
-
line checks each command against the running config and only applies commands that would change the configuration.
-
none applies all commands without checking the running config.
-
-
- save - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Save the configuration to disk after applying changes.
-
-
- src - -
- path -
-
- -
Path to a file containing set/delete commands, one per line.
-
Blank lines and lines starting with # are ignored.
-
Mutually exclusive with lines.
-
-
- - -Notes ------ - -.. note:: - - Requires ``ansible_connection=httpapi`` with the VyOS httpapi plugin. - - ``ansible_network_os`` must be set to ``vyos.rest.vyos``. - - Unlike the CLI collection's ``vyos_config``, this module does not support ``backup``, ``confirm``, or ``comment`` options as these are CLI-specific. - - Commands are parsed from CLI string format into REST API path arrays. - - - -Examples --------- - -.. code-block:: yaml - - - name: Apply configuration lines - vyos.rest.vyos_config: - lines: - - set system host-name router1 - - set system domain-name example.com - - set interfaces ethernet eth0 description "WAN" - save: true - - - name: Delete configuration - vyos.rest.vyos_config: - lines: - - delete protocols bgp - save: true - - - name: Apply config from file - vyos.rest.vyos_config: - src: /tmp/vyos_config.txt - match: none - save: true - - - name: Always apply without matching - vyos.rest.vyos_config: - lines: - - set system host-name router1 - match: none - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- commands - -
- list -
-
always -
List of commands applied to the device.
-
-
-
- response - -
- dictionary -
-
always -
Raw API response from the device.
-
-
-
- saved - -
- boolean -
-
when save is true and changes were made -
Whether the configuration was saved to disk.
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- VyOS Community (@vyos) diff --git a/docs/vyos.rest.vyos_configure_module.rst b/docs/vyos.rest.vyos_configure_module.rst deleted file mode 100644 index bc5921d..0000000 --- a/docs/vyos.rest.vyos_configure_module.rst +++ /dev/null @@ -1,168 +0,0 @@ -.. _vyos.rest.vyos_configure_module: - - -************************ -vyos.rest.vyos_configure -************************ - -**Send raw set/delete commands to a VyOS device via REST API.** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Sends one or more set/delete configuration commands to a VyOS device via the HTTPS REST API as a single atomic batch commit. -- Useful for configuration not covered by dedicated resource modules, or for test setup and teardown tasks. -- Commands are parsed from CLI-style strings (``set ...`` / ``delete ...``). - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- commands - -
- list - / elements=string - / required -
-
- -
List of CLI-style configuration commands.
-
Each command must start with set or delete.
-
-
- save - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether to save the configuration after applying commands.
-
-
- - - -See Also --------- - -.. seealso:: - - :ref:`vyos.vyos.vyos_config_module` - The official documentation on the **vyos.vyos.vyos_config** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Add loopback address for testing - vyos.rest.vyos_configure: - commands: - - set interfaces loopback lo address 20.1.1.1/32 - save: false - - - name: Remove loopback address after testing - vyos.rest.vyos_configure: - commands: - - delete interfaces loopback lo address 20.1.1.1/32 - save: false - - - name: Multiple commands in one atomic commit - vyos.rest.vyos_configure: - commands: - - set system host-name vyos-test - - set system domain-name example.com - save: true - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- commands - -
- list -
-
always -
Parsed command payloads sent to the device.
-
-
-
- response - -
- dictionary -
-
when commands are applied -
Raw API response.
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- VyOS Community (@vyos) diff --git a/docs/vyos.rest.vyos_facts_module.rst b/docs/vyos.rest.vyos_facts_module.rst deleted file mode 100644 index d5c6a89..0000000 --- a/docs/vyos.rest.vyos_facts_module.rst +++ /dev/null @@ -1,296 +0,0 @@ -.. _vyos.rest.vyos_facts_module: - - -******************** -vyos.rest.vyos_facts -******************** - -**Get facts about VyOS devices using REST API** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Collects facts from VyOS devices via the REST API. -- Returns structured facts under the ``ansible_facts`` key. -- Uses REST API (``connection=httpapi``) instead of CLI. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- gather_network_resources - -
- list - / elements=string -
-
- -
When supplied, this argument will restrict the facts collected to a given subset. Possible values include the resource module names.
-
This argument is not currently used.
-
-
- gather_subset - -
- list - / elements=string -
-
- Default:
["default"]
-
-
When supplied, this argument will restrict the facts collected to a given subset. Possible values for this argument include all, default, config, interfaces, hostname, users, bgp, ospf, ntp, snmp and logging.
-
Specify a list of values to include a larger subset. Use the exclamation mark (!) before a value to exclude it. Values all and default cannot be combined with each other or with negation.
-
-
- - -Notes ------ - -.. note:: - - Requires ``ansible_connection=httpapi`` with the VyOS httpapi plugin. - - ``ansible_network_os`` must be set to ``vyos.rest.vyos``. - - Only configuration facts are available via the REST API. Operational state (interface counters, BGP neighbors) is not supported. - - - -Examples --------- - -.. code-block:: yaml - - - name: Gather all facts - vyos.rest.vyos_facts: - gather_subset: all - - - name: Gather default facts - vyos.rest.vyos_facts: - - - name: Gather interface and hostname facts only - vyos.rest.vyos_facts: - gather_subset: - - interfaces - - hostname - - - name: Gather all except config - vyos.rest.vyos_facts: - gather_subset: - - all - - '!config' - - -Returned Facts --------------- -Facts returned by this module are added/updated in the ``hostvars`` host facts and can be referenced by name just like any other host fact. They do not need to be registered in order to use them. - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FactReturnedDescription
-
- vyos_bgp - -
- dictionary -
-
-
BGP configuration. -
-
-
-
- vyos_config - -
- dictionary -
-
-
Full device configuration as structured data. -
-
-
-
- vyos_hostname - -
- string -
-
-
Device hostname. -
-
-
-
- vyos_interfaces - -
- dictionary -
-
-
Interface configuration. -
-
-
-
- vyos_logging - -
- dictionary -
-
-
Logging configuration. -
-
-
-
- vyos_ntp - -
- dictionary -
-
-
NTP configuration. -
-
-
-
- vyos_ospf - -
- dictionary -
-
-
OSPFv2 configuration. -
-
-
-
- vyos_ospfv3 - -
- dictionary -
-
-
OSPFv3 configuration. -
-
-
-
- vyos_snmp - -
- dictionary -
-
-
SNMP configuration. -
-
-
-
- vyos_users - -
- list -
-
-
User accounts (without passwords). -
-
-
-

- - - -Status ------- - - -Authors -~~~~~~~ - -- VyOS Community (@vyos) diff --git a/docs/vyos.rest.vyos_firewall_global_module.rst b/docs/vyos.rest.vyos_firewall_global_module.rst deleted file mode 100644 index ff119a8..0000000 --- a/docs/vyos.rest.vyos_firewall_global_module.rst +++ /dev/null @@ -1,642 +0,0 @@ -.. _vyos.rest.vyos_firewall_global_module: - - -****************************** -vyos.rest.vyos_firewall_global -****************************** - -**Manage global firewall configuration on VyOS devices using REST API** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manages global firewall group configuration on VyOS devices via the REST API. -- Covers address-groups, network-groups, port-groups, interface-groups, and IPv6 network-groups. -- Uses REST API (``connection=httpapi``) instead of CLI. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- config - -
- dictionary -
-
- -
Global firewall configuration.
-
-
- group - -
- dictionary -
-
- -
Firewall groups.
-
-
- address_group - -
- list - / elements=dictionary -
-
- -
IPv4 address groups.
-
-
- address - -
- list - / elements=string -
-
- -
IP addresses or ranges in the group.
-
-
- description - -
- string -
-
- -
Group description.
-
-
- name - -
- string - / required -
-
- -
Group name.
-
-
- interface_group - -
- list - / elements=dictionary -
-
- -
Interface groups.
-
-
- description - -
- string -
-
- -
Group description.
-
-
- interface - -
- list - / elements=string -
-
- -
Interfaces in the group.
-
-
- name - -
- string - / required -
-
- -
Group name.
-
-
- ipv6_network_group - -
- list - / elements=dictionary -
-
- -
IPv6 network groups.
-
-
- description - -
- string -
-
- -
Group description.
-
-
- name - -
- string - / required -
-
- -
Group name.
-
-
- network - -
- list - / elements=string -
-
- -
IPv6 network prefixes in the group.
-
-
- network_group - -
- list - / elements=dictionary -
-
- -
IPv4 network groups.
-
-
- description - -
- string -
-
- -
Group description.
-
-
- name - -
- string - / required -
-
- -
Group name.
-
-
- network - -
- list - / elements=string -
-
- -
Network prefixes in the group.
-
-
- port_group - -
- list - / elements=dictionary -
-
- -
Port groups.
-
-
- description - -
- string -
-
- -
Group description.
-
-
- name - -
- string - / required -
-
- -
Group name.
-
-
- port - -
- list - / elements=string -
-
- -
Ports or port ranges in the group.
-
-
- state - -
- string -
-
-
    Choices: -
  • merged ←
  • -
  • replaced
  • -
  • deleted
  • -
  • gathered
  • -
-
-
Desired state of the firewall global configuration.
-
merged adds or updates without removing existing config.
-
replaced replaces the entire firewall global configuration.
-
deleted removes firewall global configuration.
-
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``. - - - -Examples --------- - -.. code-block:: yaml - - - name: Merge firewall global configuration - vyos.rest.vyos_firewall_global: - config: - group: - address_group: - - name: SERVERS - description: Web servers - address: - - 192.168.1.10 - - 192.168.1.11 - network_group: - - name: LAN - network: - - 192.168.0.0/16 - port_group: - - name: WEB-PORTS - port: - - "80" - - "443" - interface_group: - - name: LAN-IFACES - interface: - - eth1 - - eth2 - ipv6_network_group: - - name: IPV6-LAN - network: - - "2001:db8::/32" - state: merged - - - name: Delete all firewall global configuration - vyos.rest.vyos_firewall_global: - state: deleted - - - name: Gather firewall global configuration - vyos.rest.vyos_firewall_global: - state: gathered - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- after - -
- dictionary -
-
when changed -
Firewall global configuration after this module ran.
-
-
-
- before - -
- dictionary -
-
always -
Firewall global configuration before this module ran.
-
-
-
- commands - -
- list -
-
always -
List of API command tuples sent to the device.
-
-
-
- gathered - -
- dictionary -
-
when state is gathered -
Current firewall global configuration as structured data.
-
-
-
- response - -
- dictionary -
-
always -
Raw API response.
-
-
-
- saved - -
- boolean -
-
when changed -
Whether the config was saved after changes.
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- VyOS Community (@vyos) diff --git a/docs/vyos.rest.vyos_firewall_interfaces_module.rst b/docs/vyos.rest.vyos_firewall_interfaces_module.rst deleted file mode 100644 index 9ec4a3b..0000000 --- a/docs/vyos.rest.vyos_firewall_interfaces_module.rst +++ /dev/null @@ -1,632 +0,0 @@ -.. _vyos.rest.vyos_firewall_interfaces_module: - - -********************************** -vyos.rest.vyos_firewall_interfaces -********************************** - -**Manage firewall hook filters on VyOS devices using REST API** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manages firewall hook filter configuration on VyOS devices via the REST API. -- In VyOS 1.5+, firewall hook filters (input/output/forward) replace the per-interface firewall assignments used in VyOS 1.4. -- Hook filters apply globally to all traffic traversing that hook point. -- Uses REST API (``connection=httpapi``) instead of CLI. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- config - -
- list - / elements=dictionary -
-
- -
Firewall hook filter configuration.
-
-
- afi - -
- string - / required -
-
-
    Choices: -
  • ipv4
  • -
  • ipv6
  • -
-
-
Address family.
-
-
- hooks - -
- list - / elements=dictionary -
-
- -
Hook filter configurations for this address family.
-
-
- default_action - -
- string -
-
-
    Choices: -
  • accept
  • -
  • drop
  • -
  • reject
  • -
-
-
Default action when no rule matches.
-
-
- description - -
- string -
-
- -
Filter description.
-
-
- hook - -
- string - / required -
-
-
    Choices: -
  • input
  • -
  • output
  • -
  • forward
  • -
-
-
Netfilter hook point.
-
-
- rules - -
- list - / elements=dictionary -
-
- -
Rules in this hook filter.
-
-
- action - -
- string -
-
-
    Choices: -
  • accept
  • -
  • drop
  • -
  • reject
  • -
  • return
  • -
  • queue
  • -
  • continue
  • -
-
-
Rule action.
-
-
- description - -
- string -
-
- -
Rule description.
-
-
- destination - -
- dictionary -
-
- -
Destination match criteria.
-
-
- address - -
- string -
-
- -
Destination IP address or prefix.
-
-
- port - -
- string -
-
- -
Destination port or range.
-
-
- disable - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Disable this rule.
-
-
- log - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Enable logging.
-
-
- number - -
- integer - / required -
-
- -
Rule number.
-
-
- protocol - -
- string -
-
- -
Protocol to match.
-
-
- source - -
- dictionary -
-
- -
Source match criteria.
-
-
- address - -
- string -
-
- -
Source IP address or prefix.
-
-
- port - -
- string -
-
- -
Source port or range.
-
-
- state - -
- string -
-
-
    Choices: -
  • established
  • -
  • invalid
  • -
  • new
  • -
  • related
  • -
-
-
Connection state to match.
-
-
- state - -
- string -
-
-
    Choices: -
  • merged ←
  • -
  • replaced
  • -
  • overridden
  • -
  • deleted
  • -
  • gathered
  • -
-
-
Desired state of the firewall hook filter configuration.
-
merged adds or updates without removing existing config.
-
replaced replaces hook filter config for named hooks in config.
-
overridden replaces all firewall hook filter config.
-
deleted removes firewall hook filter config.
-
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``. - - In VyOS 1.5+, hook filters apply globally rather than per-interface. Use named rule sets (:ref:`vyos.rest.vyos_firewall_rules `) for more granular per-traffic control. - - - -Examples --------- - -.. code-block:: yaml - - - name: Merge firewall hook filter configuration - vyos.rest.vyos_firewall_interfaces: - config: - - afi: ipv4 - hooks: - - hook: input - default_action: accept - rules: - - number: 10 - action: accept - state: established - - number: 20 - action: drop - state: invalid - - hook: forward - default_action: accept - - hook: output - default_action: accept - - afi: ipv6 - hooks: - - hook: input - default_action: accept - state: merged - - - name: Delete all firewall hook filter configuration - vyos.rest.vyos_firewall_interfaces: - state: deleted - - - name: Gather firewall hook filter configuration - vyos.rest.vyos_firewall_interfaces: - state: gathered - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- after - -
- list -
-
when changed -
Firewall hook filter configuration after this module ran.
-
-
-
- before - -
- list -
-
always -
Firewall hook filter configuration before this module ran.
-
-
-
- commands - -
- list -
-
always -
List of API command tuples sent to the device.
-
-
-
- gathered - -
- list -
-
when state is gathered -
Current firewall hook filter configuration as structured data.
-
-
-
- response - -
- dictionary -
-
always -
Raw API response.
-
-
-
- saved - -
- boolean -
-
when changed -
Whether the config was saved after changes.
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- VyOS Community (@vyos) diff --git a/docs/vyos.rest.vyos_firewall_rules_module.rst b/docs/vyos.rest.vyos_firewall_rules_module.rst deleted file mode 100644 index 1f316fd..0000000 --- a/docs/vyos.rest.vyos_firewall_rules_module.rst +++ /dev/null @@ -1,726 +0,0 @@ -.. _vyos.rest.vyos_firewall_rules_module: - - -***************************** -vyos.rest.vyos_firewall_rules -***************************** - -**Manage firewall rule sets on VyOS devices using REST API** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manages named firewall rule sets on VyOS devices via the REST API. -- Supports both IPv4 (``ipv4``) and IPv6 (``ipv6``) rule sets. -- Uses REST API (``connection=httpapi``) instead of CLI. -- In VyOS 1.5+, firewall uses named rule sets under ``firewall.ipv4.name`` and ``firewall.ipv6.name``. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- config - -
- list - / elements=dictionary -
-
- -
Firewall rule set configuration.
-
-
- afi - -
- string - / required -
-
-
    Choices: -
  • ipv4
  • -
  • ipv6
  • -
-
-
Address family.
-
-
- rule_sets - -
- list - / elements=dictionary -
-
- -
Named rule sets for this address family.
-
-
- default_action - -
- string -
-
-
    Choices: -
  • accept
  • -
  • drop
  • -
  • reject
  • -
-
-
Default action when no rule matches.
-
-
- description - -
- string -
-
- -
Rule set description.
-
-
- name - -
- string - / required -
-
- -
Rule set name.
-
-
- rules - -
- list - / elements=dictionary -
-
- -
Firewall rules in this rule set.
-
-
- action - -
- string -
-
-
    Choices: -
  • accept
  • -
  • drop
  • -
  • reject
  • -
  • return
  • -
  • queue
  • -
  • continue
  • -
-
-
Rule action.
-
-
- description - -
- string -
-
- -
Rule description.
-
-
- destination - -
- dictionary -
-
- -
Destination match criteria.
-
-
- address - -
- string -
-
- -
Destination IP address or prefix.
-
-
- group - -
- string -
-
- -
Destination group name.
-
-
- port - -
- string -
-
- -
Destination port or range.
-
-
- disable - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Disable this rule.
-
-
- icmp - -
- dictionary -
-
- -
ICMP type/code to match.
-
-
- code - -
- integer -
-
- -
ICMP code.
-
-
- type - -
- integer -
-
- -
ICMP type.
-
-
- log - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Enable logging for this rule.
-
-
- number - -
- integer - / required -
-
- -
Rule number.
-
-
- protocol - -
- string -
-
- -
Protocol to match.
-
-
- source - -
- dictionary -
-
- -
Source match criteria.
-
-
- address - -
- string -
-
- -
Source IP address or prefix.
-
-
- group - -
- string -
-
- -
Source group name.
-
-
- port - -
- string -
-
- -
Source port or range.
-
-
- state - -
- string -
-
-
    Choices: -
  • established
  • -
  • invalid
  • -
  • new
  • -
  • related
  • -
-
-
Connection state to match.
-
-
- state - -
- string -
-
-
    Choices: -
  • merged ←
  • -
  • replaced
  • -
  • overridden
  • -
  • deleted
  • -
  • gathered
  • -
-
-
Desired state of the firewall rules configuration.
-
merged adds or updates without removing existing config.
-
replaced replaces rule sets for named rule sets in config.
-
overridden replaces all firewall rule sets.
-
deleted removes firewall rule sets.
-
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``. - - Rule sets are identified by AFI and name. Deleting a rule set removes all its rules. - - The ``group`` suboption can only reference an address-group. VyOS also supports network-group/port-group/domain-group references, which this module can read back (via ``gathered``) if already configured by other means, but cannot create -- the argspec has no group-type discriminator. - - - -Examples --------- - -.. code-block:: yaml - - - name: Merge firewall rules - vyos.rest.vyos_firewall_rules: - config: - - afi: ipv4 - rule_sets: - - name: RULE-SET1 - default_action: drop - rules: - - number: 10 - action: accept - protocol: tcp - source: - address: 192.168.1.0/24 - destination: - port: "80" - - number: 20 - action: drop - state: invalid - - afi: ipv6 - rule_sets: - - name: RULE-SET6 - default_action: accept - rules: - - number: 10 - action: accept - state: merged - - - name: Delete all firewall rules - vyos.rest.vyos_firewall_rules: - state: deleted - - - name: Gather firewall rules - vyos.rest.vyos_firewall_rules: - state: gathered - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- after - -
- list -
-
when changed -
Firewall rules configuration after this module ran.
-
-
-
- before - -
- list -
-
always -
Firewall rules configuration before this module ran.
-
-
-
- commands - -
- list -
-
always -
List of API command tuples sent to the device.
-
-
-
- gathered - -
- list -
-
when state is gathered -
Current firewall rules configuration as structured data.
-
-
-
- response - -
- dictionary -
-
always -
Raw API response.
-
-
-
- saved - -
- boolean -
-
when changed -
Whether the config was saved after changes.
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- VyOS Community (@vyos) diff --git a/docs/vyos.rest.vyos_ha_module.rst b/docs/vyos.rest.vyos_ha_module.rst deleted file mode 100644 index 68370cf..0000000 --- a/docs/vyos.rest.vyos_ha_module.rst +++ /dev/null @@ -1,1668 +0,0 @@ -.. _vyos.rest.vyos_ha_module: - - -***************** -vyos.rest.vyos_ha -***************** - -**Manage VRRP and load balancer configuration on VyOS via REST API** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manages VRRP groups, global VRRP parameters, sync-groups, virtual servers, and LVS real servers on VyOS devices via the REST API. -- Uses REST API (``connection=httpapi``) instead of CLI. -- Targets VyOS 1.4+. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- config - -
- dictionary -
-
- -
High-availability configuration.
-
-
- disable - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Disable all high-availability configuration.
-
-
- virtual_servers - -
- list - / elements=dictionary -
-
- -
List of load balancer virtual server definitions.
-
-
- address - -
- string -
-
- -
Address.
-
-
- algorithm - -
- string -
-
- -
Algorithm.
-
-
- delay_loop - -
- integer -
-
- -
Delay loop.
-
-
- forward_method - -
- string -
-
-
    Choices: -
  • direct
  • -
  • nat
  • -
-
-
Forward method.
-
-
- fwmark - -
- integer -
-
- -
Fwmark.
-
-
- name - -
- string - / required -
-
- -
Name.
-
-
- persistence_timeout - -
- integer -
-
- -
Persistence timeout.
-
-
- port - -
- integer -
-
- -
Port.
-
-
- protocol - -
- string -
-
-
    Choices: -
  • tcp
  • -
  • udp
  • -
-
-
Protocol.
-
-
- real_server - -
- list - / elements=dictionary -
-
- -
Real server.
-
-
- address - -
- string - / required -
-
- -
Address.
-
-
- connection_timeout - -
- integer -
-
- -
Connection timeout.
-
-
- health_check_script - -
- string -
-
- -
Health check script.
-
-
- port - -
- integer -
-
- -
Port.
-
-
- vrrp - -
- dictionary -
-
- -
VRRP configuration.
-
-
- global_parameters - -
- dictionary -
-
- -
Global parameters.
-
-
- garp - -
- dictionary -
-
- -
Garp.
-
-
- interval - -
- integer -
-
- -
Interval.
-
-
- master_delay - -
- integer -
-
- -
Master delay.
-
-
- master_refresh - -
- integer -
-
- -
Master refresh.
-
-
- master_refresh_repeat - -
- integer -
-
- -
Master refresh repeat.
-
-
- master_repeat - -
- integer -
-
- -
Master repeat.
-
-
- startup_delay - -
- integer -
-
- -
Startup delay.
-
-
- version - -
- string -
-
- -
Version.
-
-
- groups - -
- list - / elements=dictionary -
-
- -
Groups.
-
-
- address - -
- list - / elements=string -
-
- -
Address.
-
-
- advertise_interval - -
- integer -
-
- -
Advertise interval.
-
-
- authentication - -
- dictionary -
-
- -
Authentication.
-
-
- password - -
- string -
-
- -
Password.
-
-
- type - -
- string -
-
- -
Type.
-
-
- description - -
- string -
-
- -
Description.
-
-
- disable - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Disable.
-
-
- excluded_address - -
- list - / elements=string -
-
- -
Excluded address.
-
-
- garp - -
- dictionary -
-
- -
Garp.
-
-
- interval - -
- integer -
-
- -
Interval.
-
-
- master_delay - -
- integer -
-
- -
Master delay.
-
-
- master_refresh - -
- integer -
-
- -
Master refresh.
-
-
- master_refresh_repeat - -
- integer -
-
- -
Master refresh repeat.
-
-
- master_repeat - -
- integer -
-
- -
Master repeat.
-
-
- health_check - -
- dictionary -
-
- -
Health check.
-
-
- failure_count - -
- integer -
-
- -
Failure count.
-
-
- interval - -
- integer -
-
- -
Interval.
-
-
- ping - -
- string -
-
- -
Ping.
-
-
- script - -
- string -
-
- -
Script.
-
-
- hello_source_address - -
- string -
-
- -
Hello source address.
-
-
- interface - -
- string -
-
- -
Interface.
-
-
- name - -
- string - / required -
-
- -
Name.
-
-
- no_preempt - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
No preempt.
-
-
- peer_address - -
- string -
-
- -
Peer address.
-
-
- preempt_delay - -
- integer -
-
- -
Preempt delay.
-
-
- priority - -
- integer -
-
- -
Priority.
-
-
- rfc3768_compatibility - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Rfc3768 compatibility.
-
-
- track - -
- dictionary -
-
- -
Track.
-
-
- exclude_vrrp_interface - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Exclude vrrp interface.
-
-
- interface - -
- list - / elements=string -
-
- -
Interface.
-
-
- transition_script - -
- dictionary -
-
- -
Transition script.
-
-
- backup - -
- string -
-
- -
Backup.
-
-
- fault - -
- string -
-
- -
Fault.
-
-
- master - -
- string -
-
- -
Master.
-
-
- stop - -
- string -
-
- -
Stop.
-
-
- vrid - -
- integer -
-
- -
Vrid.
-
-
- snmp - -
- string -
-
-
    Choices: -
  • enabled
  • -
  • disabled
  • -
-
-
Snmp.
-
-
- sync_groups - -
- list - / elements=dictionary -
-
- -
Sync groups.
-
-
- health_check - -
- dictionary -
-
- -
Health check.
-
-
- failure_count - -
- integer -
-
- -
Failure count.
-
-
- interval - -
- integer -
-
- -
Interval.
-
-
- ping - -
- string -
-
- -
Ping.
-
-
- script - -
- string -
-
- -
Script.
-
-
- member - -
- list - / elements=string -
-
- -
Member.
-
-
- name - -
- string - / required -
-
- -
Name.
-
-
- transition_script - -
- dictionary -
-
- -
Transition script.
-
-
- backup - -
- string -
-
- -
Backup.
-
-
- fault - -
- string -
-
- -
Fault.
-
-
- master - -
- string -
-
- -
Master.
-
-
- stop - -
- string -
-
- -
Stop.
-
-
- state - -
- string -
-
-
    Choices: -
  • merged ←
  • -
  • replaced
  • -
  • overridden
  • -
  • deleted
  • -
  • gathered
  • -
-
-
Desired end state of the configuration.
-
-
- - - - -Examples --------- - -.. code-block:: yaml - - - name: Merge VRRP configuration - vyos.rest.vyos_ha: - config: - vrrp: - global_parameters: - startup_delay: 30 - groups: - - name: g1 - interface: eth0 - vrid: 20 - priority: 100 - address: - - 192.168.1.100/24 - sync_groups: - - name: sg1 - member: [g1] - snmp: enabled - state: merged - - - name: Delete all HA configuration - vyos.rest.vyos_ha: - state: deleted - - - name: Gather current HA configuration - vyos.rest.vyos_ha: - state: gathered - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- after - -
- dictionary -
-
when changed -
HA configuration after this module ran.
-
-
-
- before - -
- dictionary -
-
always -
HA configuration before this module ran.
-
-
-
- commands - -
- list -
-
always -
List of API commands sent to the device.
-
-
-
- gathered - -
- dictionary -
-
when state is gathered -
Current HA configuration as structured data.
-
-
-
- saved - -
- boolean -
-
when changed -
Whether the config was saved after changes.
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Evgeny Molotkov (@omnom62) diff --git a/docs/vyos.rest.vyos_hostname_module.rst b/docs/vyos.rest.vyos_hostname_module.rst deleted file mode 100644 index c8ea1c5..0000000 --- a/docs/vyos.rest.vyos_hostname_module.rst +++ /dev/null @@ -1,370 +0,0 @@ -.. _vyos.rest.vyos_hostname_module: - - -*********************** -vyos.rest.vyos_hostname -*********************** - -**Manage the system hostname on a VyOS device via the REST API.** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manages the ``set system host-name`` configuration on a VyOS device using the HTTPS REST API. -- Mirrors the behaviour of ``vyos.vyos.vyos_hostname`` but uses the HTTP API instead of SSH/network_cli. -- The states ``replaced``, ``overridden`` behave identically to ``merged`` for this single-value resource. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- VyOS 1.3+ - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- api_key - -
- string -
-
- -
API key configured on the device.
-
-
- config - -
- dictionary -
-
- -
Hostname configuration.
-
-
- hostname - -
- string - / required -
-
- -
System hostname (max 63 characters, no underscores).
-
-
- hostname - -
- string -
-
- -
IP address or FQDN of the VyOS device (not needed with httpapi inventory).
-
-
- port - -
- integer -
-
- Default:
443
-
-
HTTPS port for the REST API.
-
-
- running_config - -
- string -
-
- -
Used only with state parsed.
-
The value should be the output of show configuration commands | grep host-name from the device.
-
-
- state - -
- string -
-
-
    Choices: -
  • merged ←
  • -
  • replaced
  • -
  • overridden
  • -
  • deleted
  • -
  • gathered
  • -
  • rendered
  • -
  • parsed
  • -
-
-
merged - Ensure the hostname is set to the value in config.
-
replaced - Identical to merged for this single-value resource.
-
overridden - Identical to merged for this single-value resource.
-
deleted - Remove the configured hostname (resets to default).
-
gathered - Read the current hostname from the device and return it in gathered without making changes.
-
rendered - Return the CLI commands for the given config without connecting to the device.
-
parsed - Parse the running_config string and return structured data without connecting to the device.
-
-
- timeout - -
- integer -
-
- Default:
30
-
-
Request timeout in seconds.
-
-
- verify_ssl - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Validate the device's TLS certificate.
-
-
- - - -See Also --------- - -.. seealso:: - - :ref:`vyos.vyos.vyos_hostname_module` - The official documentation on the **vyos.vyos.vyos_hostname** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Set hostname - vyos.rest.vyos_hostname: - config: - hostname: vyos-core-01 - state: merged - - - name: Replace hostname - vyos.rest.vyos_hostname: - config: - hostname: vyos-core-02 - state: replaced - - - name: Gather current hostname - vyos.rest.vyos_hostname: - state: gathered - register: result - - - name: Delete hostname configuration - vyos.rest.vyos_hostname: - state: deleted - - - name: Render commands without connecting - vyos.rest.vyos_hostname: - config: - hostname: vyos-core-01 - state: rendered - - - name: Parse running config - vyos.rest.vyos_hostname: - running_config: "set system host-name 'vyos'" - state: parsed - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- after - -
- dictionary -
-
when changed -
Configuration on the device after the module ran.
-
-
-
- before - -
- dictionary -
-
always -
Configuration on the device before the module ran.
-
-
-
- commands - -
- list -
-
always -
REST API commands dispatched.
-
-
-
- gathered - -
- dictionary -
-
when state is gathered -
Hostname read from the device (state=gathered only).
-
-
-
- parsed - -
- dictionary -
-
when state is parsed -
Structured data parsed from running_config (state=parsed only).
-
-
-
- rendered - -
- list -
-
when state is rendered -
CLI commands for the provided config (state=rendered only).
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- VyOS Community (@vyos) diff --git a/docs/vyos.rest.vyos_httpapi.rst b/docs/vyos.rest.vyos_httpapi.rst deleted file mode 100644 index e493ebc..0000000 --- a/docs/vyos.rest.vyos_httpapi.rst +++ /dev/null @@ -1,81 +0,0 @@ -.. _vyos.rest.vyos_httpapi: - - -************** -vyos.rest.vyos -************** - -**HttpApi plugin for VyOS REST API** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- This HttpApi plugin provides methods to connect to VyOS devices via their HTTPS REST API. -- Use with ``ansible_connection=ansible.netcommon.httpapi`` and ``ansible_network_os=vyos.rest.vyos``. -- The VyOS REST API must be enabled with ``set service https api keys id ansible key YOUR_KEY``, ``set service https api rest``, then ``commit && save``. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - -
ParameterChoices/DefaultsConfigurationComments
-
- api_key - -
- string -
-
- -
env:VYOS_API_KEY
-
var: ansible_httpapi_api_key
-
var: ansible_vyos_api_key
-
-
The API key configured on the VyOS device.
-
Set ansible_httpapi_api_key in inventory or the VYOS_API_KEY environment variable.
-
-
- - - - - - - - -Status ------- - - -Authors -~~~~~~~ - -- VyOS Community (@vyos) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. diff --git a/docs/vyos.rest.vyos_interfaces_module.rst b/docs/vyos.rest.vyos_interfaces_module.rst deleted file mode 100644 index 8438d9d..0000000 --- a/docs/vyos.rest.vyos_interfaces_module.rst +++ /dev/null @@ -1,356 +0,0 @@ -.. _vyos.rest.vyos_interfaces_module: - - -************************* -vyos.rest.vyos_interfaces -************************* - -**Manage interface configuration on VyOS devices via REST API.** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manages L2 interface configuration (description, MTU, speed, duplex, enabled) on VyOS devices using the HTTPS REST API. -- IP address configuration is handled by :ref:`vyos.rest.vyos_l3_interfaces `. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- config - -
- list - / elements=dictionary -
-
- -
List of interface configurations.
-
-
- description - -
- string -
-
- -
Interface description.
-
-
- duplex - -
- string -
-
-
    Choices: -
  • auto
  • -
  • full
  • -
  • half
  • -
-
-
Interface duplex setting.
-
-
- enabled - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Whether the interface is enabled. False sets the disable flag.
-
-
- mtu - -
- integer -
-
- -
Interface MTU.
-
-
- name - -
- string - / required -
-
- -
Full interface name (e.g. eth0, bond0, lo).
-
-
- speed - -
- string -
-
-
    Choices: -
  • auto
  • -
  • 10
  • -
  • 100
  • -
  • 1000
  • -
  • 2500
  • -
  • 10000
  • -
-
-
Interface speed setting.
-
-
- state - -
- string -
-
-
    Choices: -
  • merged ←
  • -
  • replaced
  • -
  • overridden
  • -
  • deleted
  • -
  • gathered
  • -
-
-
merged - Merge config with existing interface settings.
-
replaced - Replace config for listed interfaces.
-
overridden - Replace config for all interfaces.
-
deleted - Remove listed interface config or all interface config.
-
gathered - Read interface config from device without changes.
-
-
- - - -See Also --------- - -.. seealso:: - - :ref:`vyos.vyos.vyos_interfaces_module` - The official documentation on the **vyos.vyos.vyos_interfaces** module. - :ref:`vyos.rest.vyos_l3_interfaces_module` - The official documentation on the **vyos.rest.vyos_l3_interfaces** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Merge interface configuration - vyos.rest.vyos_interfaces: - config: - - name: eth0 - description: Management interface - mtu: 1500 - enabled: true - state: merged - - - name: Disable an interface - vyos.rest.vyos_interfaces: - config: - - name: eth1 - enabled: false - state: merged - - - name: Delete interface description - vyos.rest.vyos_interfaces: - config: - - name: eth0 - state: deleted - - - name: Gather current interface configuration - vyos.rest.vyos_interfaces: - state: gathered - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- after - -
- list -
-
when changed -
Interface configuration after this module ran.
-
-
-
- before - -
- list -
-
always -
Interface configuration before this module ran.
-
-
-
- commands - -
- list -
-
always -
List of API command tuples sent to the device.
-
-
-
- gathered - -
- list -
-
when state is gathered -
Current interface 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) diff --git a/docs/vyos.rest.vyos_l3_interfaces_module.rst b/docs/vyos.rest.vyos_l3_interfaces_module.rst deleted file mode 100644 index d251abb..0000000 --- a/docs/vyos.rest.vyos_l3_interfaces_module.rst +++ /dev/null @@ -1,494 +0,0 @@ -.. _vyos.rest.vyos_l3_interfaces_module: - - -**************************** -vyos.rest.vyos_l3_interfaces -**************************** - -**Manage L3 interface configuration on VyOS devices via REST API.** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manages IPv4 and IPv6 address configuration on VyOS interfaces using the HTTPS REST API. -- Mirrors ``vyos.vyos.vyos_l3_interfaces`` but uses the HTTP API instead of CLI. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- config - -
- list - / elements=dictionary -
-
- -
List of L3 interface configurations.
-
-
- ipv4 - -
- list - / elements=dictionary -
-
- -
List of IPv4 addresses of the interface.
-
-
- address - -
- string -
-
- -
IPv4 address in CIDR notation or dhcp.
-
-
- ipv6 - -
- list - / elements=dictionary -
-
- -
List of IPv6 addresses of the interface.
-
-
- address - -
- string -
-
- -
IPv6 address in CIDR notation, dhcpv6, or auto-config.
-
-
- name - -
- string - / required -
-
- -
Full name of the interface, e.g. eth0, lo.
-
-
- vifs - -
- list - / elements=dictionary -
-
- -
List of virtual sub-interfaces (VLANs).
-
-
- ipv4 - -
- list - / elements=dictionary -
-
- -
List of IPv4 addresses of the VIF.
-
-
- address - -
- string -
-
- -
IPv4 address in CIDR notation or dhcp.
-
-
- ipv6 - -
- list - / elements=dictionary -
-
- -
List of IPv6 addresses of the VIF.
-
-
- address - -
- string -
-
- -
IPv6 address in CIDR notation, dhcpv6, or auto-config.
-
-
- vlan_id - -
- integer - / required -
-
- -
VLAN identifier.
-
-
- running_config - -
- string -
-
- -
Used only with state parsed.
-
-
- state - -
- string -
-
-
    Choices: -
  • merged ←
  • -
  • replaced
  • -
  • overridden
  • -
  • deleted
  • -
  • gathered
  • -
  • rendered
  • -
  • parsed
  • -
-
-
merged - Add addresses without removing existing ones.
-
replaced - Replace addresses for listed interfaces.
-
overridden - Replace addresses for all interfaces.
-
deleted - Remove listed or all interface addresses.
-
gathered - Read interface addresses from device without changes.
-
rendered - Return commands for provided config without connecting.
-
parsed - Parse running_config into structured data.
-
-
- - - -See Also --------- - -.. seealso:: - - :ref:`vyos.vyos.vyos_l3_interfaces_module` - The official documentation on the **vyos.vyos.vyos_l3_interfaces** module. - :ref:`vyos.rest.vyos_interfaces_module` - The official documentation on the **vyos.rest.vyos_interfaces** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Merge L3 interface configuration - vyos.rest.vyos_l3_interfaces: - config: - - name: eth0 - ipv4: - - address: 192.0.2.1/24 - - address: dhcp - - name: lo - ipv4: - - address: 10.0.0.1/32 - ipv6: - - address: 2001:db8::1/128 - state: merged - - - name: Add VLAN subinterface addresses - vyos.rest.vyos_l3_interfaces: - config: - - name: eth0 - vifs: - - vlan_id: 100 - ipv4: - - address: 192.0.2.100/24 - state: merged - - - name: Delete all interface addresses - vyos.rest.vyos_l3_interfaces: - state: deleted - - - name: Gather current L3 interface configuration - vyos.rest.vyos_l3_interfaces: - state: gathered - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- after - -
- list -
-
when changed -
L3 interface configuration after this module ran.
-
-
-
- before - -
- list -
-
always -
L3 interface configuration before this module ran.
-
-
-
- commands - -
- list -
-
always -
List of API command tuples sent to the device.
-
-
-
- gathered - -
- list -
-
when state is gathered -
Current L3 interface configuration as structured data.
-
-
-
- parsed - -
- list -
-
when state is parsed -
Structured data parsed from running_config (state=parsed).
-
-
-
- rendered - -
- list -
-
when state is rendered -
Commands for the provided config (state=rendered).
-
-
-
- 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) diff --git a/docs/vyos.rest.vyos_lag_interfaces_module.rst b/docs/vyos.rest.vyos_lag_interfaces_module.rst deleted file mode 100644 index 49753f0..0000000 --- a/docs/vyos.rest.vyos_lag_interfaces_module.rst +++ /dev/null @@ -1,448 +0,0 @@ -.. _vyos.rest.vyos_lag_interfaces_module: - - -***************************** -vyos.rest.vyos_lag_interfaces -***************************** - -**Manage LAG interface configuration on VyOS devices via REST API.** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manages Link Aggregation Group (LAG/bonding) interface configuration on VyOS devices using the HTTPS REST API. -- Mirrors ``vyos.vyos.vyos_lag_interfaces`` but uses the HTTP API instead of CLI. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- config - -
- list - / elements=dictionary -
-
- -
List of LAG interface configurations.
-
-
- arp_monitor - -
- dictionary -
-
- -
ARP link monitoring parameters.
-
-
- interval - -
- integer -
-
- -
ARP monitoring interval in milliseconds.
-
-
- target - -
- list - / elements=string -
-
- -
IP addresses to use for ARP monitoring.
-
-
- hash_policy - -
- string -
-
-
    Choices: -
  • layer2
  • -
  • layer2+3
  • -
  • layer3+4
  • -
-
-
Transmit hash policy.
-
-
- members - -
- list - / elements=dictionary -
-
- -
List of member interfaces.
-
-
- member - -
- string -
-
- -
Name of the member interface.
-
-
- mode - -
- string -
-
-
    Choices: -
  • 802.3ad
  • -
  • active-backup
  • -
  • broadcast
  • -
  • round-robin
  • -
  • transmit-load-balance
  • -
  • adaptive-load-balance
  • -
  • xor-hash
  • -
-
-
LAG bonding mode.
-
-
- name - -
- string - / required -
-
- -
Name of the LAG interface (e.g. bond0).
-
-
- primary - -
- string -
-
- -
Primary interface for active-backup mode.
-
-
- running_config - -
- string -
-
- -
Used only with state parsed.
-
-
- state - -
- string -
-
-
    Choices: -
  • merged ←
  • -
  • replaced
  • -
  • overridden
  • -
  • deleted
  • -
  • gathered
  • -
  • rendered
  • -
  • parsed
  • -
-
-
merged - Merge config with existing LAG settings.
-
replaced - Replace config for listed LAG interfaces.
-
overridden - Replace config for all LAG interfaces.
-
deleted - Remove listed or all LAG interface config.
-
gathered - Read LAG config from device without changes.
-
rendered - Return commands for provided config without connecting.
-
parsed - Parse running_config into structured data.
-
-
- - - -See Also --------- - -.. seealso:: - - :ref:`vyos.vyos.vyos_lag_interfaces_module` - The official documentation on the **vyos.vyos.vyos_lag_interfaces** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Merge LAG interface configuration - vyos.rest.vyos_lag_interfaces: - config: - - name: bond0 - mode: 802.3ad - hash_policy: layer2 - members: - - member: eth1 - - member: eth2 - state: merged - - - name: Delete all LAG interfaces - vyos.rest.vyos_lag_interfaces: - state: deleted - - - name: Gather current LAG configuration - vyos.rest.vyos_lag_interfaces: - state: gathered - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- after - -
- list -
-
when changed -
LAG configuration after this module ran.
-
-
-
- before - -
- list -
-
always -
LAG configuration before this module ran.
-
-
-
- commands - -
- list -
-
always -
List of API command tuples sent to the device.
-
-
-
- gathered - -
- list -
-
when state is gathered -
Current LAG configuration as structured data.
-
-
-
- parsed - -
- list -
-
when state is parsed -
Structured data parsed from running_config (state=parsed).
-
-
-
- rendered - -
- list -
-
when state is rendered -
Commands for provided config (state=rendered).
-
-
-
- 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) diff --git a/docs/vyos.rest.vyos_lldp_global_module.rst b/docs/vyos.rest.vyos_lldp_global_module.rst deleted file mode 100644 index 9016792..0000000 --- a/docs/vyos.rest.vyos_lldp_global_module.rst +++ /dev/null @@ -1,279 +0,0 @@ -.. _vyos.rest.vyos_lldp_global_module: - - -************************** -vyos.rest.vyos_lldp_global -************************** - -**Manage LLDP global configuration on VyOS via REST API.** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manage LLDP global configuration on VyOS via REST API. -- Uses ``ansible_connection=ansible.netcommon.httpapi``. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- config - -
- dictionary -
-
- -
LLDP global configuration.
-
-
- addresses - -
- list - / elements=string -
-
- -
List of management addresses to advertise.
-
-
- enable - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Enable LLDP service.
-
-
- legacy_protocols - -
- list - / elements=string -
-
-
    Choices: -
  • cdp
  • -
  • edp
  • -
  • fdp
  • -
  • sonmp
  • -
-
-
Legacy protocols to support.
-
-
- snmp - -
- string -
-
- -
enable to enable LLDP SNMP subagent.
-
disable to disable it.
-
Requires SNMP service to be configured on the device.
-
-
- state - -
- string -
-
-
    Choices: -
  • merged ←
  • -
  • replaced
  • -
  • deleted
  • -
  • gathered
  • -
-
-
merged - merge config with existing.
-
replaced - replace existing config with provided.
-
deleted - delete LLDP configuration.
-
gathered - return current config without changes.
-
-
- - - - -Examples --------- - -.. code-block:: yaml - - - name: Enable LLDP with management address and legacy protocols - vyos.rest.vyos_lldp_global: - config: - enable: true - addresses: - - 192.0.2.17 - legacy_protocols: - - cdp - - fdp - state: merged - - - name: Replace LLDP configuration - vyos.rest.vyos_lldp_global: - config: - enable: true - addresses: - - 192.0.2.99 - state: replaced - - - name: Delete all LLDP configuration - vyos.rest.vyos_lldp_global: - state: deleted - - - name: Gather current LLDP configuration - vyos.rest.vyos_lldp_global: - state: gathered - register: result - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- after - -
- dictionary -
-
when changed -
LLDP configuration after the module ran.
-
-
-
- before - -
- dictionary -
-
always -
LLDP configuration before the module ran.
-
-
-
- commands - -
- list -
-
always -
List of commands sent to the device.
-
-
-
- gathered - -
- dictionary -
-
when state is gathered -
Current LLDP configuration from the device.
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- VyOS Community (@vyos) diff --git a/docs/vyos.rest.vyos_lldp_interfaces_module.rst b/docs/vyos.rest.vyos_lldp_interfaces_module.rst deleted file mode 100644 index c294c79..0000000 --- a/docs/vyos.rest.vyos_lldp_interfaces_module.rst +++ /dev/null @@ -1,470 +0,0 @@ -.. _vyos.rest.vyos_lldp_interfaces_module: - - -****************************** -vyos.rest.vyos_lldp_interfaces -****************************** - -**Manage LLDP interface configuration on VyOS devices via REST API.** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manages per-interface LLDP configuration on VyOS devices using the HTTPS REST API. -- Targets VyOS 1.5+ where LLDP interface mode replaces the legacy disable flag. -- For the disable flag used in VyOS 1.3/1.4, see ``vyos.vyos.vyos_lldp_interfaces``. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- config - -
- list - / elements=dictionary -
-
- -
List of LLDP interface configurations.
-
-
- location - -
- dictionary -
-
- -
LLDP-MED location data.
-
-
- coordinate_based - -
- dictionary -
-
- -
Coordinate-based location.
-
-
- altitude - -
- integer -
-
- -
Altitude in meters.
-
-
- datum - -
- string -
-
-
    Choices: -
  • WGS84
  • -
  • NAD83
  • -
  • MLLW
  • -
-
-
Coordinate datum type.
-
-
- latitude - -
- string - / required -
-
- -
Latitude (e.g. 33.524449N).
-
-
- longitude - -
- string - / required -
-
- -
Longitude (e.g. 22.267255E).
-
-
- elin - -
- string -
-
- -
Emergency Call Service ELIN number (10-25 digits).
-
-
- mode - -
- string -
-
-
    Choices: -
  • disable
  • -
  • rx-tx
  • -
  • rx
  • -
  • tx
  • -
-
-
LLDP administrative mode for this interface.
-
rx-tx sends and receives LLDP frames (default).
-
disable disables LLDP on this interface.
-
rx receives only.
-
tx transmits only.
-
-
- name - -
- string - / required -
-
- -
Name of the interface.
-
-
- running_config - -
- string -
-
- -
Used only with state parsed.
-
-
- state - -
- string -
-
-
    Choices: -
  • merged ←
  • -
  • replaced
  • -
  • overridden
  • -
  • deleted
  • -
  • gathered
  • -
  • rendered
  • -
  • parsed
  • -
-
-
merged - Merge config with existing LLDP interface settings.
-
replaced - Replace config for listed interfaces.
-
overridden - Replace config for all LLDP interfaces.
-
deleted - Remove listed or all LLDP interface config.
-
gathered - Read LLDP interface config from device without changes.
-
rendered - Return commands for provided config without connecting.
-
parsed - Parse running_config into structured data.
-
-
- - -Notes ------ - -.. note:: - - Targets VyOS 1.5+ exclusively. The ``mode`` parameter replaces the ``enable`` boolean used in ``vyos.vyos.vyos_lldp_interfaces`` for VyOS 1.3/1.4. - - -See Also --------- - -.. seealso:: - - :ref:`vyos.vyos.vyos_lldp_interfaces_module` - The official documentation on the **vyos.vyos.vyos_lldp_interfaces** module. - :ref:`vyos.rest.vyos_lldp_global_module` - The official documentation on the **vyos.rest.vyos_lldp_global** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Merge LLDP interface configuration - vyos.rest.vyos_lldp_interfaces: - config: - - name: eth0 - mode: disable - location: - elin: "1234567890" - - name: eth1 - location: - coordinate_based: - latitude: "33.524449N" - longitude: "22.267255E" - altitude: 2200 - datum: WGS84 - state: merged - - - name: Delete all LLDP interface configuration - vyos.rest.vyos_lldp_interfaces: - state: deleted - - - name: Gather current LLDP interface configuration - vyos.rest.vyos_lldp_interfaces: - state: gathered - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- after - -
- list -
-
when changed -
LLDP interface configuration after this module ran.
-
-
-
- before - -
- list -
-
always -
LLDP interface configuration before this module ran.
-
-
-
- commands - -
- list -
-
always -
List of API command tuples sent to the device.
-
-
-
- gathered - -
- list -
-
when state is gathered -
Current LLDP interface configuration as structured data.
-
-
-
- parsed - -
- list -
-
when state is parsed -
Structured data parsed from running_config (state=parsed).
-
-
-
- rendered - -
- list -
-
when state is rendered -
Commands for provided config (state=rendered).
-
-
-
- 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) diff --git a/docs/vyos.rest.vyos_logging_global_module.rst b/docs/vyos.rest.vyos_logging_global_module.rst deleted file mode 100644 index b529dd0..0000000 --- a/docs/vyos.rest.vyos_logging_global_module.rst +++ /dev/null @@ -1,635 +0,0 @@ -.. _vyos.rest.vyos_logging_global_module: - - -***************************** -vyos.rest.vyos_logging_global -***************************** - -**Manage syslog configuration on VyOS devices using REST API** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manages syslog (logging) configuration on VyOS devices via the REST API. -- Targets VyOS 1.5+ syslog schema under ``system syslog``. -- Uses REST API (``connection=httpapi``) instead of CLI. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- config - -
- dictionary -
-
- -
Logging configuration.
-
-
- console - -
- dictionary -
-
- -
Logging to serial console.
-
-
- facilities - -
- list - / elements=dictionary -
-
- -
List of syslog facilities to log to the console.
-
-
- facility - -
- string -
-
- -
Syslog facility name (e.g. local7, all, kern).
-
-
- severity - -
- string -
-
- -
Minimum severity level to log (e.g. err, debug, all).
-
-
- global_params - -
- dictionary -
-
- -
Global syslog parameters (maps to system syslog local on device).
-
-
- facilities - -
- list - / elements=dictionary -
-
- -
List of syslog facilities for local logging.
-
-
- facility - -
- string -
-
- -
Syslog facility name.
-
-
- severity - -
- string -
-
- -
Minimum severity level to log.
-
-
- marker_interval - -
- integer -
-
- -
Interval in seconds between marker log entries.
-
-
- preserve_fqdn - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Use the fully qualified domain name in syslog messages.
-
-
- hosts - -
- list - / elements=dictionary -
-
- -
Logging to remote syslog hosts (maps to system syslog remote).
-
-
- facilities - -
- list - / elements=dictionary -
-
- -
List of syslog facilities to forward to this host.
-
-
- facility - -
- string -
-
- -
Syslog facility name.
-
-
- protocol - -
- string -
-
- -
Per-facility protocol override (udp or tcp).
-
-
- severity - -
- string -
-
- -
Minimum severity level to forward.
-
-
- hostname - -
- string -
-
- -
IP address or hostname of the remote syslog server.
-
-
- port - -
- integer -
-
- -
UDP/TCP port on the remote syslog server (default 514).
-
-
- protocol - -
- string -
-
- -
Transport protocol (udp or tcp).
-
-
- users - -
- list - / elements=dictionary -
-
- -
Logging to local user terminals.
-
-
- facilities - -
- list - / elements=dictionary -
-
- -
List of syslog facilities to send to this user.
-
-
- facility - -
- string -
-
- -
Syslog facility name.
-
-
- severity - -
- string -
-
- -
Minimum severity level to send.
-
-
- username - -
- string -
-
- -
Local username whose terminal receives log messages.
-
-
- state - -
- string -
-
-
    Choices: -
  • merged ←
  • -
  • replaced
  • -
  • overridden
  • -
  • deleted
  • -
  • gathered
  • -
-
-
Desired state of the logging configuration.
-
-
- - - - -Examples --------- - -.. code-block:: yaml - - - name: Merge logging configuration - vyos.rest.vyos_logging_global: - config: - console: - facilities: - - facility: local7 - severity: err - hosts: - - hostname: 172.16.0.1 - port: 514 - facilities: - - facility: local7 - severity: all - users: - - username: vyos - facilities: - - facility: local7 - severity: debug - global_params: - facilities: - - facility: cron - severity: debug - marker_interval: 111 - preserve_fqdn: true - state: merged - - - name: Delete all logging configuration - vyos.rest.vyos_logging_global: - state: deleted - - - name: Gather current logging configuration - vyos.rest.vyos_logging_global: - state: gathered - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- after - -
- dictionary -
-
when changed -
Logging configuration after this module ran.
-
-
-
- before - -
- dictionary -
-
when state is merged, replaced, overridden or deleted -
Logging configuration before this module ran.
-
-
-
- commands - -
- list -
-
always -
List of API command tuples sent to the device.
-
-
-
- gathered - -
- dictionary -
-
when state is gathered -
Current logging configuration from the device.
-
-
-
- saved - -
- dictionary -
-
when changed -
Result of save_config after applying changes.
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Sagar Paul (@KB-perByte) diff --git a/docs/vyos.rest.vyos_nat_module.rst b/docs/vyos.rest.vyos_nat_module.rst deleted file mode 100644 index 1200416..0000000 --- a/docs/vyos.rest.vyos_nat_module.rst +++ /dev/null @@ -1,208 +0,0 @@ -.. _vyos.rest.vyos_nat_module: - - -****************** -vyos.rest.vyos_nat -****************** - -**Manage NAT configuration on VyOS devices using REST API** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manages NAT configuration on VyOS devices via the REST API. -- Supports source, destination, static, CGNAT, NAT64, and NAT66. -- Uses REST API (``connection=httpapi``) instead of CLI. -- Targets VyOS 1.5+. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- config - -
- dictionary -
-
- -
NAT configuration.
-
-
- state - -
- string -
-
-
    Choices: -
  • merged ←
  • -
  • replaced
  • -
  • overridden
  • -
  • deleted
  • -
  • gathered
  • -
-
-
The desired state of the NAT configuration.
-
-
- - - - -Examples --------- - -.. code-block:: yaml - - - name: Merge source NAT rule - vyos.rest.vyos_nat: - config: - nat: - source: - rule: - - id: 100 - outbound_interface: - name: eth0 - translation: - address: masquerade - state: merged - - - name: Delete all NAT - vyos.rest.vyos_nat: - state: deleted - - - name: Gather NAT configuration - vyos.rest.vyos_nat: - state: gathered - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- after - -
- dictionary -
-
when changed -
NAT configuration after this module ran.
-
-
-
- before - -
- dictionary -
-
always -
NAT configuration before this module ran.
-
-
-
- commands - -
- list -
-
always -
List of API commands sent to the device.
-
-
-
- gathered - -
- dictionary -
-
when state is gathered -
Current NAT configuration as structured data.
-
-
-
- saved - -
- boolean -
-
when changed -
Whether the config was saved after changes.
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Evgeny Molotkov (@omnom62) diff --git a/docs/vyos.rest.vyos_ntp_global_module.rst b/docs/vyos.rest.vyos_ntp_global_module.rst deleted file mode 100644 index ba209a8..0000000 --- a/docs/vyos.rest.vyos_ntp_global_module.rst +++ /dev/null @@ -1,322 +0,0 @@ -.. _vyos.rest.vyos_ntp_global_module: - - -************************* -vyos.rest.vyos_ntp_global -************************* - -**Manage NTP configuration on VyOS devices using REST API** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manages NTP server, allow-client, and listen-address configuration on VyOS devices via the REST API. -- Supports idempotent operation using structured data. -- Uses REST API (``connection=httpapi``) instead of CLI. -- Targets VyOS 1.4+ where NTP is managed by chronyd under ``service ntp``. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- config - -
- dictionary -
-
- -
NTP configuration.
-
-
- allow_clients - -
- list - / elements=string -
-
- -
List of client networks or addresses allowed to query this NTP server.
-
Maps to service ntp allow-client address on the device.
-
-
- listen_addresses - -
- list - / elements=string -
-
- -
Local IP addresses the NTP service should listen on.
-
Maps to service ntp listen-address on the device.
-
-
- servers - -
- list - / elements=dictionary -
-
- -
List of upstream NTP servers to synchronise from.
-
-
- options - -
- list - / elements=string -
-
-
    Choices: -
  • dynamic
  • -
  • noselect
  • -
  • pool
  • -
  • preempt
  • -
  • prefer
  • -
  • nts
  • -
  • ptp
  • -
  • interleave
  • -
-
-
Per-server options.
-
-
- server - -
- string - / required -
-
- -
Server hostname or IP address.
-
-
- state - -
- string -
-
-
    Choices: -
  • merged ←
  • -
  • replaced
  • -
  • overridden
  • -
  • deleted
  • -
  • gathered
  • -
-
-
The desired state of the NTP configuration.
-
-
- - - - -Examples --------- - -.. code-block:: yaml - - - name: Gather current NTP configuration - vyos.rest.vyos_ntp_global: - state: gathered - - - name: Merge NTP configuration - vyos.rest.vyos_ntp_global: - config: - allow_clients: - - 10.6.6.0/24 - listen_addresses: - - 10.1.3.1 - servers: - - server: 203.0.113.0 - options: - - prefer - state: merged - - - name: Replace NTP configuration - vyos.rest.vyos_ntp_global: - config: - allow_clients: - - 10.6.6.0/24 - listen_addresses: - - 10.1.3.1 - servers: - - server: 203.0.113.0 - options: - - prefer - state: replaced - - - name: Delete all managed NTP configuration - vyos.rest.vyos_ntp_global: - state: deleted - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- after - -
- dictionary -
-
when changed -
NTP configuration after this module ran.
-
-
-
- before - -
- dictionary -
-
when state is merged, replaced, overridden or deleted -
NTP configuration before this module ran.
-
-
-
- commands - -
- list -
-
always -
List of API commands sent to the device.
-
-
-
- gathered - -
- dictionary -
-
when state is gathered -
Current NTP configuration as structured data.
-
-
-
- saved - -
- boolean -
-
when changed -
Whether the config was saved after changes.
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Varshitha Yataluru (@YVarshitha) diff --git a/docs/vyos.rest.vyos_ospf_interfaces_module.rst b/docs/vyos.rest.vyos_ospf_interfaces_module.rst deleted file mode 100644 index 1439a71..0000000 --- a/docs/vyos.rest.vyos_ospf_interfaces_module.rst +++ /dev/null @@ -1,612 +0,0 @@ -.. _vyos.rest.vyos_ospf_interfaces_module: - - -****************************** -vyos.rest.vyos_ospf_interfaces -****************************** - -**Manage OSPF interface configuration on VyOS devices using REST API** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manages OSPF and OSPFv3 interface configuration on VyOS devices via the REST API. -- IPv4 OSPF maps to ``protocols ospf interface``. -- IPv6 OSPFv3 maps to ``protocols ospfv3 interface``. -- Uses REST API (``connection=httpapi``) instead of CLI. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- config - -
- list - / elements=dictionary -
-
- -
List of OSPF interface configurations.
-
-
- address_family - -
- list - / elements=dictionary -
-
- -
OSPF settings per address family.
-
-
- afi - -
- string - / required -
-
-
    Choices: -
  • ipv4
  • -
  • ipv6
  • -
-
-
Address family identifier.
-
-
- authentication - -
- dictionary -
-
- -
Authentication settings (IPv4 only).
-
-
- md5_key - -
- dictionary -
-
- -
MD5 authentication key.
-
-
- key - -
- string -
-
- -
MD5 key string.
-
-
- key_id - -
- integer -
-
- -
MD5 key ID.
-
-
- plaintext_password - -
- string -
-
- -
Plaintext password.
-
-
- bandwidth - -
- integer -
-
- -
Interface bandwidth in kbps (IPv4 only).
-
-
- cost - -
- integer -
-
- -
Interface cost metric.
-
-
- dead_interval - -
- integer -
-
- -
Dead router detection interval in seconds.
-
-
- hello_interval - -
- integer -
-
- -
Hello packet interval in seconds.
-
-
- ifmtu - -
- integer -
-
- -
Interface MTU (IPv6 only).
-
-
- instance - -
- string -
-
- -
OSPFv3 instance ID (IPv6 only).
-
-
- mtu_ignore - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Disable MTU check (IPv4 only).
-
-
- network - -
- string -
-
-
    Choices: -
  • broadcast
  • -
  • non-broadcast
  • -
  • point-to-multipoint
  • -
  • point-to-point
  • -
-
-
Network type (IPv4 only).
-
-
- passive - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Disable adjacency formation (IPv6 only).
-
-
- priority - -
- integer -
-
- -
Interface priority.
-
-
- retransmit_interval - -
- integer -
-
- -
LSA retransmit interval in seconds.
-
-
- transmit_delay - -
- integer -
-
- -
LSA transmit delay in seconds.
-
-
- name - -
- string - / required -
-
- -
Interface name.
-
-
- state - -
- string -
-
-
    Choices: -
  • merged ←
  • -
  • replaced
  • -
  • overridden
  • -
  • deleted
  • -
  • gathered
  • -
-
-
Desired state of the OSPF interface configuration.
-
merged adds or updates without removing existing config.
-
replaced replaces per-interface OSPF config for named interfaces.
-
overridden replaces all OSPF interface config.
-
deleted removes OSPF interface config.
-
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``. - - - -Examples --------- - -.. code-block:: yaml - - - name: Merge OSPF interface configuration - vyos.rest.vyos_ospf_interfaces: - config: - - name: eth1 - address_family: - - afi: ipv4 - cost: 100 - transmit_delay: 50 - priority: 26 - - afi: ipv6 - dead_interval: 39 - passive: true - state: merged - - - name: Delete OSPF interface configuration - vyos.rest.vyos_ospf_interfaces: - config: - - name: eth1 - state: deleted - - - name: Delete all OSPF interface configuration - vyos.rest.vyos_ospf_interfaces: - state: deleted - - - name: Gather current OSPF interface configuration - vyos.rest.vyos_ospf_interfaces: - state: gathered - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- after - -
- list -
-
when changed -
OSPF interface configuration after this module ran.
-
-
-
- before - -
- list -
-
always -
OSPF interface configuration before this module ran.
-
-
-
- commands - -
- list -
-
always -
List of API command tuples sent to the device.
-
-
-
- gathered - -
- list -
-
when state is gathered -
Current OSPF interface 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) diff --git a/docs/vyos.rest.vyos_ospfv2_module.rst b/docs/vyos.rest.vyos_ospfv2_module.rst deleted file mode 100644 index 1c5c248..0000000 --- a/docs/vyos.rest.vyos_ospfv2_module.rst +++ /dev/null @@ -1,1263 +0,0 @@ -.. _vyos.rest.vyos_ospfv2_module: - - -********************* -vyos.rest.vyos_ospfv2 -********************* - -**Manage OSPFv2 configuration on VyOS devices using REST API** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manages OSPFv2 configuration on VyOS devices via the REST API. -- Uses REST API (``connection=httpapi``) instead of CLI. -- In VyOS 1.5+, passive interfaces use per-interface config rather than passive-interface. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- config - -
- dictionary -
-
- -
OSPFv2 configuration.
-
-
- areas - -
- list - / elements=dictionary -
-
- -
OSPFv2 areas.
-
-
- area_id - -
- string - / required -
-
- -
Area ID.
-
-
- area_type - -
- dictionary -
-
- -
Area type.
-
-
- normal - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Normal area.
-
-
- nssa - -
- dictionary -
-
- -
NSSA area.
-
-
- default_cost - -
- integer -
-
- -
Default cost for NSSA.
-
-
- no_summary - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Do not inject inter-area routes.
-
-
- set - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Enable NSSA.
-
-
- translate - -
- string -
-
-
    Choices: -
  • always
  • -
  • candidate
  • -
  • never
  • -
-
-
NSSA-ABR translate setting.
-
-
- stub - -
- dictionary -
-
- -
Stub area.
-
-
- default_cost - -
- integer -
-
- -
Default cost for stub.
-
-
- no_summary - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Do not inject inter-area routes.
-
-
- set - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Enable stub.
-
-
- authentication - -
- string -
-
-
    Choices: -
  • plaintext-password
  • -
  • md5
  • -
-
-
Area authentication type.
-
-
- network - -
- list - / elements=dictionary -
-
- -
Networks in this area.
-
-
- address - -
- string - / required -
-
- -
Network address.
-
-
- range - -
- list - / elements=dictionary -
-
- -
Area ranges.
-
-
- address - -
- string - / required -
-
- -
Range address.
-
-
- cost - -
- integer -
-
- -
Cost for this range.
-
-
- not_advertise - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Do not advertise this range.
-
-
- substitute - -
- string -
-
- -
Substitute prefix.
-
-
- shortcut - -
- string -
-
-
    Choices: -
  • default
  • -
  • disable
  • -
  • enable
  • -
-
-
Shortcut mode.
-
-
- auto_cost - -
- dictionary -
-
- -
Auto-cost reference bandwidth.
-
-
- reference_bandwidth - -
- integer -
-
- -
Reference bandwidth in Mbps.
-
-
- default_information - -
- dictionary -
-
- -
Default route distribution.
-
-
- originate - -
- dictionary -
-
- -
Originate default route.
-
-
- always - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Always advertise default route.
-
-
- metric - -
- integer -
-
- -
Metric for default route.
-
-
- metric_type - -
- integer -
-
- -
Metric type.
-
-
- route_map - -
- string -
-
- -
Route map.
-
-
- default_metric - -
- integer -
-
- -
Default metric for redistributed routes.
-
-
- distance - -
- dictionary -
-
- -
Administrative distances.
-
-
- global - -
- integer -
-
- -
Global OSPFv2 distance.
-
-
- ospf - -
- dictionary -
-
- -
Per-route-type distances.
-
-
- external - -
- integer -
-
- -
External route distance.
-
-
- inter_area - -
- integer -
-
- -
Inter-area route distance.
-
-
- intra_area - -
- integer -
-
- -
Intra-area route distance.
-
-
- log_adjacency_changes - -
- string -
-
-
    Choices: -
  • detail
  • -
-
-
Log adjacency changes.
-
-
- neighbor - -
- list - / elements=dictionary -
-
- -
OSPF neighbors.
-
-
- neighbor_id - -
- string - / required -
-
- -
Neighbor IP.
-
-
- poll_interval - -
- integer -
-
- -
Poll interval.
-
-
- priority - -
- integer -
-
- -
Neighbor priority.
-
-
- parameters - -
- dictionary -
-
- -
OSPFv2 parameters.
-
-
- abr_type - -
- string -
-
-
    Choices: -
  • cisco
  • -
  • ibm
  • -
  • shortcut
  • -
  • standard
  • -
-
-
ABR type.
-
-
- opaque_lsa - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Enable opaque LSA.
-
-
- rfc1583_compatibility - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Enable RFC1583 compatibility.
-
-
- router_id - -
- string -
-
- -
Router ID.
-
-
- passive_interface - -
- list - / elements=string -
-
- -
Passive interfaces (VyOS 1.5+: configured via protocols ospf interface <name> passive).
-
-
- redistribute - -
- list - / elements=dictionary -
-
- -
Route redistribution.
-
-
- metric - -
- integer -
-
- -
Metric.
-
-
- metric_type - -
- integer -
-
- -
Metric type.
-
-
- route_map - -
- string -
-
- -
Route map.
-
-
- route_type - -
- string -
-
-
    Choices: -
  • bgp
  • -
  • connected
  • -
  • kernel
  • -
  • rip
  • -
  • static
  • -
-
-
Protocol to redistribute.
-
-
- state - -
- string -
-
-
    Choices: -
  • merged ←
  • -
  • replaced
  • -
  • deleted
  • -
  • gathered
  • -
-
-
Desired state.
-
merged adds/updates without removing existing config.
-
replaced replaces the entire OSPFv2 configuration.
-
deleted removes OSPFv2 configuration.
-
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``. - - VyOS 1.5+ uses per-interface passive configuration rather than the global ``passive-interface`` command used in VyOS 1.4. - - - -Examples --------- - -.. code-block:: yaml - - - name: Merge OSPFv2 configuration - vyos.rest.vyos_ospfv2: - config: - parameters: - router_id: 192.0.1.1 - abr_type: cisco - auto_cost: - reference_bandwidth: 2 - areas: - - area_id: "2" - area_type: - normal: true - network: - - address: 192.0.2.0/24 - - area_id: "3" - area_type: - nssa: - set: true - - area_id: "4" - area_type: - stub: - default_cost: 20 - range: - - address: 192.0.3.0/24 - cost: 10 - redistribute: - - route_type: bgp - metric: 10 - passive_interface: - - eth1 - state: merged - - - name: Delete all OSPFv2 configuration - vyos.rest.vyos_ospfv2: - state: deleted - - - name: Gather current OSPFv2 configuration - vyos.rest.vyos_ospfv2: - state: gathered - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- after - -
- dictionary -
-
when changed -
OSPFv2 configuration after this module ran.
-
-
-
- before - -
- dictionary -
-
always -
OSPFv2 configuration before this module ran.
-
-
-
- commands - -
- list -
-
always -
List of API command tuples sent to the device.
-
-
-
- gathered - -
- dictionary -
-
when state is gathered -
Current OSPFv2 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) diff --git a/docs/vyos.rest.vyos_ospfv3_module.rst b/docs/vyos.rest.vyos_ospfv3_module.rst deleted file mode 100644 index 18bb48e..0000000 --- a/docs/vyos.rest.vyos_ospfv3_module.rst +++ /dev/null @@ -1,480 +0,0 @@ -.. _vyos.rest.vyos_ospfv3_module: - - -********************* -vyos.rest.vyos_ospfv3 -********************* - -**Manage OSPFv3 configuration on VyOS devices using REST API** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manages OSPFv3 configuration on VyOS devices via the REST API. -- Uses REST API (``connection=httpapi``) instead of CLI. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- config - -
- dictionary -
-
- -
OSPFv3 configuration.
-
-
- areas - -
- list - / elements=dictionary -
-
- -
OSPFv3 areas.
-
-
- area_id - -
- string - / required -
-
- -
Area identity.
-
-
- export_list - -
- string -
-
- -
Name of export-list.
-
-
- import_list - -
- string -
-
- -
Name of import-list.
-
-
- range - -
- list - / elements=dictionary -
-
- -
Summarize routes matching prefix.
-
-
- address - -
- string - / required -
-
- -
IPv6 prefix.
-
-
- advertise - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Advertise this range.
-
-
- not_advertise - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Do not advertise this range.
-
-
- parameters - -
- dictionary -
-
- -
OSPFv3 global parameters.
-
-
- router_id - -
- string -
-
- -
Router ID (IPv4 address format).
-
-
- redistribute - -
- list - / elements=dictionary -
-
- -
Redistribute routes from another protocol.
-
-
- route_map - -
- string -
-
- -
Route map to apply.
-
-
- route_type - -
- string -
-
-
    Choices: -
  • bgp
  • -
  • connected
  • -
  • kernel
  • -
  • ripng
  • -
  • static
  • -
-
-
Protocol to redistribute.
-
-
- state - -
- string -
-
-
    Choices: -
  • merged ←
  • -
  • replaced
  • -
  • deleted
  • -
  • gathered
  • -
-
-
Desired state of the OSPFv3 configuration.
-
merged adds or updates without removing existing config.
-
replaced replaces the entire OSPFv3 configuration.
-
deleted removes OSPFv3 configuration.
-
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``. - - - -Examples --------- - -.. code-block:: yaml - - - name: Merge OSPFv3 configuration - vyos.rest.vyos_ospfv3: - config: - parameters: - router_id: 192.0.2.10 - redistribute: - - route_type: bgp - areas: - - area_id: "2" - export_list: export1 - import_list: import1 - range: - - address: "2001:db10::/32" - - address: "2001:db20::/32" - state: merged - - - name: Delete all OSPFv3 configuration - vyos.rest.vyos_ospfv3: - state: deleted - - - name: Gather current OSPFv3 configuration - vyos.rest.vyos_ospfv3: - state: gathered - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- after - -
- dictionary -
-
when changed -
OSPFv3 configuration after this module ran.
-
-
-
- before - -
- dictionary -
-
always -
OSPFv3 configuration before this module ran.
-
-
-
- commands - -
- list -
-
always -
List of API command tuples sent to the device.
-
-
-
- gathered - -
- dictionary -
-
when state is gathered -
Current OSPFv3 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) diff --git a/docs/vyos.rest.vyos_prefix_lists_module.rst b/docs/vyos.rest.vyos_prefix_lists_module.rst deleted file mode 100644 index 53321c9..0000000 --- a/docs/vyos.rest.vyos_prefix_lists_module.rst +++ /dev/null @@ -1,454 +0,0 @@ -.. _vyos.rest.vyos_prefix_lists_module: - - -*************************** -vyos.rest.vyos_prefix_lists -*************************** - -**Manage prefix-list configuration on VyOS devices using REST API** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manages IPv4 and IPv6 prefix lists on VyOS via the REST API. -- Uses REST API (``connection=httpapi``) instead of CLI. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- config - -
- list - / elements=dictionary -
-
- -
List of prefix-list configurations grouped by address family.
-
-
- afi - -
- string - / required -
-
-
    Choices: -
  • ipv4
  • -
  • ipv6
  • -
-
-
Address family identifier.
-
-
- prefix_lists - -
- list - / elements=dictionary -
-
- -
Named prefix lists.
-
-
- description - -
- string -
-
- -
Prefix list description.
-
-
- entries - -
- list - / elements=dictionary -
-
- -
Prefix list rules.
-
-
- action - -
- string -
-
-
    Choices: -
  • permit
  • -
  • deny
  • -
-
-
Permit or deny.
-
-
- description - -
- string -
-
- -
Rule description.
-
-
- ge - -
- integer -
-
- -
Minimum prefix length.
-
-
- le - -
- integer -
-
- -
Maximum prefix length.
-
-
- prefix - -
- string -
-
- -
Network prefix to match.
-
-
- sequence - -
- integer - / required -
-
- -
Rule sequence number.
-
-
- name - -
- string - / required -
-
- -
Prefix list name.
-
-
- state - -
- string -
-
-
    Choices: -
  • merged ←
  • -
  • replaced
  • -
  • overridden
  • -
  • deleted
  • -
  • gathered
  • -
-
-
Desired state of the prefix-list configuration.
-
merged adds or updates entries without removing existing ones.
-
replaced replaces each named prefix list mentioned in config.
-
overridden replaces all prefix lists for the given AFIs.
-
deleted removes prefix lists. 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``. - - - -Examples --------- - -.. code-block:: yaml - - - name: Merge prefix list configuration - vyos.rest.vyos_prefix_lists: - config: - - afi: ipv4 - prefix_lists: - - name: AnsibleIPv4PrefixList - description: PL configured by ansible - entries: - - sequence: 2 - action: permit - prefix: 92.168.10.0/26 - le: 32 - - sequence: 3 - action: deny - prefix: 72.168.2.0/24 - ge: 26 - - afi: ipv6 - prefix_lists: - - name: AllowIPv6Prefix - entries: - - sequence: 5 - action: permit - prefix: 2001:db8:8000::/35 - le: 37 - state: merged - - - name: Delete all prefix lists - vyos.rest.vyos_prefix_lists: - state: deleted - - - name: Gather current prefix list configuration - vyos.rest.vyos_prefix_lists: - state: gathered - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- after - -
- list -
-
when changed -
Prefix list configuration after this module ran.
-
-
-
- before - -
- list -
-
always -
Prefix list configuration before this module ran.
-
-
-
- commands - -
- list -
-
always -
List of API command tuples sent to the device.
-
-
-
- gathered - -
- list -
-
when state is gathered -
Current prefix list 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) diff --git a/docs/vyos.rest.vyos_route_maps_module.rst b/docs/vyos.rest.vyos_route_maps_module.rst deleted file mode 100644 index 675b0af..0000000 --- a/docs/vyos.rest.vyos_route_maps_module.rst +++ /dev/null @@ -1,1288 +0,0 @@ -.. _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. -- Covers the commonly used match/set fields (as documented below). VyOS's route-map schema is considerably larger than this (EVPN attributes, extended communities, RPKI matching, on-match goto/next, route-source, source-peer, source-vrf, and more) -- those are not modeled by this module and are a real, documented limitation, not an oversight. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- config - -
- list - / elements=dictionary -
-
- -
List of route-map configurations.
-
-
- entries - -
- list - / elements=dictionary -
-
- -
Route map rules.
-
-
- action - -
- string -
-
-
    Choices: -
  • permit
  • -
  • deny
  • -
-
-
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.
-
-
- interface - -
- string -
-
- -
Interface to match.
-
-
- ip - -
- dictionary -
-
- -
IPv4 next-hop match parameters.
-
-
- nexthop_address - -
- string -
-
- -
IPv4 next-hop address to match.
-
-
- nexthop_prefix_list - -
- string -
-
- -
IPv4 next-hop prefix-list to match.
-
-
- ipv6 - -
- dictionary -
-
- -
IPv6 next-hop match parameters.
-
-
- nexthop_address - -
- string -
-
- -
IPv6 next-hop address to match.
-
-
- metric - -
- integer -
-
- -
Metric of route to match.
-
-
- origin - -
- string -
-
-
    Choices: -
  • egp
  • -
  • igp
  • -
  • incomplete
  • -
-
-
BGP origin code to match.
-
-
- peer - -
- string -
-
- -
Peer address to match.
-
-
- prefix_list - -
- string -
-
- -
IPv4 prefix-list to match.
-
-
- prefix_list6 - -
- string -
-
- -
IPv6 prefix-list to match.
-
-
- protocol - -
- string -
-
-
    Choices: -
  • babel
  • -
  • bgp
  • -
  • connected
  • -
  • isis
  • -
  • kernel
  • -
  • ospf
  • -
  • ospfv3
  • -
  • rip
  • -
  • ripng
  • -
  • static
  • -
  • table
  • -
  • vnc
  • -
-
-
Match protocol via which the route was learnt.
-
-
- sequence - -
- integer - / required -
-
- -
Rule sequence number (1-65535).
-
-
- set - -
- dictionary -
-
- -
Route parameters to set.
-
-
- aggregator - -
- dictionary -
-
- -
BGP aggregator attribute.
-
-
- as_ - -
- integer -
-
- -
AS number of an aggregation.
-

aliases: as
-
-
- ip - -
- string -
-
- -
IP address of an aggregation.
-
-
- as_path_exclude - -
- string -
-
- -
AS number(s) to remove from the as-path attribute.
-
-
- as_path_prepend - -
- string -
-
- -
AS number(s) to prepend to the as-path attribute.
-
-
- as_path_prepend_last_as - -
- integer -
-
- -
Number of times to prepend the last AS number in the as-path.
-
-
- atomic_aggregate - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Set the BGP atomic aggregate attribute.
-
-
- community - -
- dictionary -
-
- -
BGP community attribute.
-
-
- add - -
- list - / elements=string -
-
- -
Communities to add to a prefix.
-
-
- delete - -
- string -
-
- -
Remove communities defined in a list from a prefix.
-
-
- none - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Completely remove the communities attribute from a prefix.
-
-
- replace - -
- list - / elements=string -
-
- -
Communities to set for a prefix.
-
-
- distance - -
- integer -
-
- -
Locally significant administrative distance.
-
-
- ip_next_hop - -
- string -
-
- -
IPv4 next-hop address to set.
-
-
- ipv6_next_hop - -
- dictionary -
-
- -
IPv6 next-hop to set.
-
-
- global - -
- string -
-
- -
Nexthop IPv6 global address.
-
-
- local - -
- string -
-
- -
Nexthop IPv6 local address.
-
-
- peer_address - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Use the peer address (BGP only) as the nexthop.
-
-
- prefer_global - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Prefer the global address as the nexthop.
-
-
- large_community - -
- dictionary -
-
- -
BGP large community attribute.
-
-
- add - -
- list - / elements=string -
-
- -
Large communities to add to a prefix.
-
-
- delete - -
- string -
-
- -
Remove large communities defined in a list from a prefix.
-
-
- none - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Completely remove the large-community attribute from a prefix.
-
-
- replace - -
- list - / elements=string -
-
- -
Large communities to set for a prefix.
-
-
- local_preference - -
- integer -
-
- -
BGP local preference.
-
-
- metric - -
- integer -
-
- -
Metric of route.
-
-
- metric_type - -
- string -
-
- -
Metric type.
-
-
- origin - -
- string -
-
-
    Choices: -
  • egp
  • -
  • igp
  • -
  • incomplete
  • -
-
-
BGP origin code to set.
-
-
- originator_id - -
- string -
-
- -
BGP originator ID.
-
-
- src - -
- string -
-
- -
Source address for route.
-
-
- table - -
- integer -
-
- -
Non-main kernel routing table.
-
-
- tag - -
- integer -
-
- -
Route tag value.
-
-
- weight - -
- integer -
-
- -
BGP weight.
-
-
- 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``. - - - -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 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- 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 -
-
always -
Raw API response.
-
-
-
- saved - -
- boolean -
-
when changed -
Whether the config was saved after changes.
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- VyOS Community (@vyos) diff --git a/docs/vyos.rest.vyos_snmp_server_module.rst b/docs/vyos.rest.vyos_snmp_server_module.rst deleted file mode 100644 index d183f88..0000000 --- a/docs/vyos.rest.vyos_snmp_server_module.rst +++ /dev/null @@ -1,1242 +0,0 @@ -.. _vyos.rest.vyos_snmp_server_module: - - -************************** -vyos.rest.vyos_snmp_server -************************** - -**Manage SNMP server configuration on VyOS devices using REST API** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manages SNMP server configuration on VyOS devices via the REST API. -- Supports communities, listen addresses, contact/location/description, trap target, and SNMPv3 (engine ID, groups, users, views). -- Uses REST API (``connection=httpapi``) instead of CLI. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- config - -
- dictionary -
-
- -
SNMP server configuration.
-
-
- communities - -
- list - / elements=dictionary -
-
- -
SNMP community configuration.
-
-
- authorization_type - -
- string -
-
-
    Choices: -
  • ro
  • -
  • rw
  • -
-
-
Authorization type (ro=read-only, rw=read-write).
-
-
- clients - -
- list - / elements=string -
-
- -
IP addresses of SNMP clients allowed to contact the system.
-
-
- name - -
- string - / required -
-
- -
Community name.
-
-
- networks - -
- list - / elements=string -
-
- -
Subnets of SNMP clients allowed to contact the system.
-
-
- contact - -
- string -
-
- -
Contact person for the system.
-
-
- description - -
- string -
-
- -
System description.
-
-
- listen_addresses - -
- list - / elements=dictionary -
-
- -
IP addresses to listen for incoming SNMP requests.
-
-
- address - -
- string - / required -
-
- -
IP address to listen on.
-
-
- port - -
- integer -
-
- -
UDP port (default 161).
-
-
- location - -
- string -
-
- -
System location.
-
-
- smux_peer - -
- string -
-
- -
Register a subtree for SMUX-based processing. The device supports multiple values here; this module manages a single value only.
-
-
- snmp_v3 - -
- dictionary -
-
- -
SNMPv3 configuration.
-
-
- engine_id - -
- string -
-
- -
EngineID as a hex string.
-
-
- groups - -
- list - / elements=dictionary -
-
- -
SNMPv3 group configuration.
-
-
- group - -
- string - / required -
-
- -
Group name.
-
-
- mode - -
- string -
-
-
    Choices: -
  • ro
  • -
  • rw
  • -
-
-
Access mode (ro=read-only, rw=read-write).
-
-
- seclevel - -
- string -
-
-
    Choices: -
  • auth
  • -
  • priv
  • -
-
-
Minimum security level required for group members.
-
-
- view - -
- string -
-
- -
View name the group has access to.
-
-
- trap_targets - -
- list - / elements=dictionary -
-
- -
SNMPv3 trap target configuration.
-
-
- address - -
- string - / required -
-
- -
IP address of the SNMPv3 trap target.
-
-
- authentication - -
- dictionary -
-
- -
Authentication parameters for trap target.
-
-
- encrypted_key - -
- string -
-
- -
Encrypted authentication key.
-
-
- plaintext_key - -
- string -
-
- -
Plaintext authentication key.
-
-
- type - -
- string -
-
- -
Authentication algorithm.
-
-
- port - -
- integer -
-
- -
UDP port on the trap target host.
-
-
- privacy - -
- dictionary -
-
- -
Privacy parameters for trap target.
-
-
- encrypted_key - -
- string -
-
- -
Encrypted privacy key.
-
-
- plaintext_key - -
- string -
-
- -
Plaintext privacy key.
-
-
- type - -
- string -
-
- -
Privacy algorithm.
-
-
- protocol - -
- string -
-
-
    Choices: -
  • tcp
  • -
  • udp
  • -
-
-
Transport protocol for traps.
-
-
- type - -
- string -
-
-
    Choices: -
  • inform
  • -
  • trap
  • -
-
-
Trap type.
-
-
- users - -
- list - / elements=dictionary -
-
- -
SNMPv3 user configuration.
-
-
- authentication - -
- dictionary -
-
- -
Authentication parameters for this user.
-
-
- encrypted_key - -
- string -
-
- -
Encrypted authentication key (stored as encrypted-password on device).
-
-
- plaintext_key - -
- string -
-
- -
Plaintext authentication key (device encrypts it).
-
-
- type - -
- string -
-
- -
Authentication algorithm.
-
-
- group - -
- string -
-
- -
Group this user belongs to.
-
-
- mode - -
- string -
-
-
    Choices: -
  • ro
  • -
  • rw
  • -
-
-
Access mode for this user.
-
-
- privacy - -
- dictionary -
-
- -
Privacy (encryption) parameters for this user.
-
-
- encrypted_key - -
- string -
-
- -
Encrypted privacy key.
-
-
- plaintext_key - -
- string -
-
- -
Plaintext privacy key (device encrypts it).
-
-
- type - -
- string -
-
- -
Privacy algorithm.
-
-
- tsm_key - -
- string -
-
- -
TSM fingerprint of the certificate mapped to this user.
-
-
- user - -
- string - / required -
-
- -
Username.
-
-
- views - -
- list - / elements=dictionary -
-
- -
SNMPv3 view configuration. The device supports multiple OIDs (each with its own exclude/mask) per view; this module manages a single OID entry per view only.
-
-
- exclude - -
- string -
-
- -
OID subtree excluded from this view.
-
-
- mask - -
- string -
-
- -
OID mask for the view.
-
-
- oid - -
- string -
-
- -
OID subtree included in this view.
-
-
- view - -
- string - / required -
-
- -
View name.
-
-
- trap_source - -
- string -
-
- -
SNMP trap source address.
-
-
- trap_target - -
- dictionary -
-
- -
SNMP (v2) trap target. The device supports multiple trap targets; this module manages a single one only.
-
-
- address - -
- string - / required -
-
- -
IP address of the trap target host.
-
-
- community - -
- string -
-
- -
Community name to use for traps.
-
-
- port - -
- integer -
-
- -
UDP port on the trap target host.
-
-
- state - -
- string -
-
-
    Choices: -
  • merged ←
  • -
  • replaced
  • -
  • overridden
  • -
  • deleted
  • -
  • gathered
  • -
-
-
Desired state of SNMP configuration.
-
-
- - - - -Examples --------- - -.. code-block:: yaml - - - name: Merge SNMP configuration - vyos.rest.vyos_snmp_server: - config: - communities: - - name: switches - authorization_type: rw - - name: bridges - clients: - - 1.1.1.1 - - 12.1.1.10 - contact: admin2@ex.com - listen_addresses: - - address: 20.1.1.1 - - address: 100.1.2.1 - port: 33 - snmp_v3: - users: - - user: admin_user - authentication: - plaintext_key: abc1234567 - type: sha - privacy: - plaintext_key: abc1234567 - type: aes - state: merged - - - name: Delete all SNMP configuration - vyos.rest.vyos_snmp_server: - state: deleted - - - name: Gather current SNMP configuration - vyos.rest.vyos_snmp_server: - state: gathered - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- after - -
- dictionary -
-
when changed -
SNMP configuration after this module ran.
-
-
-
- before - -
- dictionary -
-
when state is merged, replaced, overridden or deleted -
SNMP configuration before this module ran.
-
-
-
- commands - -
- list -
-
always -
List of API command tuples sent to the device.
-
-
-
- gathered - -
- dictionary -
-
when state is gathered -
Current SNMP configuration as structured data.
-
-
-
- saved - -
- boolean -
-
when changed -
Whether the config was saved after changes.
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- your_name (@yourhandle) diff --git a/docs/vyos.rest.vyos_static_routes_module.rst b/docs/vyos.rest.vyos_static_routes_module.rst deleted file mode 100644 index 353cf2d..0000000 --- a/docs/vyos.rest.vyos_static_routes_module.rst +++ /dev/null @@ -1,429 +0,0 @@ -.. _vyos.rest.vyos_static_routes_module: - - -**************************** -vyos.rest.vyos_static_routes -**************************** - -**Manage static routes on VyOS devices via REST API.** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manages IPv4 and IPv6 static routes on VyOS devices using the HTTPS REST API. -- Covers blackhole routes (distance) and next-hop routes (distance, disable, outgoing interface). VyOS's static-route schema is considerably larger than this -- reject routes (an ICMP-unreachable counterpart to blackhole), a top-level per-route interface (a route resolved via an outgoing interface with no next-hop address at all), route tags, route descriptions, ECMP segment weighting, VRF leaking, and BFD monitoring on next-hops are not modeled here. That is a real, documented limitation, not an oversight. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- config - -
- list - / elements=dictionary -
-
- -
List of static route configurations grouped by address family.
-
-
- afi - -
- string - / required -
-
-
    Choices: -
  • ipv4
  • -
  • ipv6
  • -
-
-
Address family indicator.
-
-
- routes - -
- list - / elements=dictionary -
-
- -
List of static route entries.
-
-
- blackhole_config - -
- dictionary -
-
- -
Blackhole route configuration (silently discard matching packets).
-
-
- distance - -
- integer -
-
- -
Administrative distance (1-255).
-
-
- dest - -
- string - / required -
-
- -
Destination prefix in CIDR notation.
-
-
- next_hops - -
- list - / elements=dictionary -
-
- -
List of next-hop addresses.
-
-
- admin_distance - -
- integer -
-
- -
Administrative distance for this next-hop (1-255).
-
-
- enabled - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Whether this next-hop is enabled.
-
-
- forward_router_address - -
- string - / required -
-
- -
Next-hop IP address.
-
-
- interface - -
- string -
-
- -
Outgoing interface name.
-
-
- state - -
- string -
-
-
    Choices: -
  • merged ←
  • -
  • replaced
  • -
  • overridden
  • -
  • deleted
  • -
  • gathered
  • -
-
-
merged - Add routes without removing existing ones.
-
replaced - Replace each named route (by afi + dest) exactly as specified.
-
overridden - Replace the entire static route table.
-
deleted - Remove listed or all static routes.
-
gathered - Read static routes from device without changes.
-
-
- - - -See Also --------- - -.. seealso:: - - :ref:`vyos.vyos.vyos_static_routes_module` - The official documentation on the **vyos.vyos.vyos_static_routes** module. - - -Examples --------- - -.. code-block:: yaml - - - name: Merge IPv4 and IPv6 static routes - vyos.rest.vyos_static_routes: - config: - - afi: ipv4 - routes: - - dest: 192.0.2.0/24 - next_hops: - - forward_router_address: 10.0.0.1 - - dest: 203.0.113.0/24 - blackhole_config: - distance: 200 - - afi: ipv6 - routes: - - dest: 2001:db8::/32 - next_hops: - - forward_router_address: 2001:db8::1 - state: merged - - - name: Delete all static routes - vyos.rest.vyos_static_routes: - state: deleted - - - name: Gather current static routes - vyos.rest.vyos_static_routes: - state: gathered - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- after - -
- list -
-
when changed -
Static route configuration after this module ran.
-
-
-
- before - -
- list -
-
always -
Static route configuration before this module ran.
-
-
-
- commands - -
- list -
-
always -
List of API command tuples sent to the device.
-
-
-
- gathered - -
- list -
-
when state is gathered -
Current static route 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) diff --git a/docs/vyos.rest.vyos_system_module.rst b/docs/vyos.rest.vyos_system_module.rst deleted file mode 100644 index 0aa5f4f..0000000 --- a/docs/vyos.rest.vyos_system_module.rst +++ /dev/null @@ -1,254 +0,0 @@ -.. _vyos.rest.vyos_system_module: - - -********************* -vyos.rest.vyos_system -********************* - -**Manage system settings on VyOS devices using REST API** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manages basic system settings on VyOS devices via the REST API. -- Uses REST API (``connection=httpapi``) instead of CLI. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- domain_name - -
- string -
-
- -
Device domain name.
-
-
- domain_search - -
- list - / elements=string -
-
- -
List of domain search suffixes.
-
-
- host_name - -
- string -
-
- -
Device hostname.
-
-
- name_server - -
- list - / elements=string -
-
- -
List of DNS name servers.
-

aliases: name_servers
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
present applies the configuration.
-
absent removes the configuration.
-
-
- - -Notes ------ - -.. note:: - - Requires ``ansible_connection=httpapi`` with the VyOS httpapi plugin. - - ``ansible_network_os`` must be set to ``vyos.rest.vyos``. - - - -Examples --------- - -.. code-block:: yaml - - - name: Configure hostname and domain - vyos.rest.vyos_system: - host_name: router1 - domain_name: example.com - name_server: - - 8.8.8.8 - - 8.8.4.4 - state: present - - - name: Remove domain name and name servers - vyos.rest.vyos_system: - domain_name: example.com - name_server: - - 8.8.8.8 - state: absent - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- after - -
- dictionary -
-
when changed -
Module-owned system configuration after this module ran.
-
-
-
- before - -
- dictionary -
-
always -
Module-owned system configuration before this module ran.
-
-
-
- commands - -
- list -
-
always -
List of API command tuples sent to the device.
-
-
-
- response - -
- dictionary -
-
always -
Raw API response.
-
-
-
- saved - -
- boolean -
-
when changed -
Whether the config was saved after changes.
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- VyOS Community (@vyos) diff --git a/docs/vyos.rest.vyos_user_module.rst b/docs/vyos.rest.vyos_user_module.rst deleted file mode 100644 index 8cf2cda..0000000 --- a/docs/vyos.rest.vyos_user_module.rst +++ /dev/null @@ -1,393 +0,0 @@ -.. _vyos.rest.vyos_user_module: - - -******************* -vyos.rest.vyos_user -******************* - -**Manage user accounts on VyOS devices using REST API** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manages local user accounts on VyOS devices via the REST API. -- Uses REST API (``connection=httpapi``) instead of CLI. -- Passwords are write-only. Once set, they cannot be read back in plaintext. -- Use ``update_password=on_create`` to avoid resetting passwords on every run. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
  • gathered
  • -
-
-
present ensures users exist with the specified configuration.
-
absent removes specified users.
-
gathered returns current user configuration as structured data.
-
-
- users - -
- list - / elements=dictionary -
-
- -
List of user definitions.
-
-
- full_name - -
- string -
-
- -
Full name of the user.
-
-
- name - -
- string - / required -
-
- -
Username.
-
-
- password - -
- string -
-
- -
Plaintext password. Write-only — hashed on device immediately.
-
-
- public_keys - -
- list - / elements=dictionary -
-
- -
SSH public keys for the user.
-
-
- key - -
- string - / required -
-
- -
Base64-encoded public key.
-
-
- name - -
- string - / required -
-
- -
Key identifier/name.
-
-
- type - -
- string - / required -
-
-
    Choices: -
  • ssh-dss
  • -
  • ssh-rsa
  • -
  • ecdsa-sha2-nistp256
  • -
  • ecdsa-sha2-nistp384
  • -
  • ecdsa-sha2-nistp521
  • -
  • ssh-ed25519
  • -
-
-
Key type.
-
-
- update_password - -
- string -
-
-
    Choices: -
  • always ←
  • -
  • on_create
  • -
-
-
Control when password is updated.
-
always updates the password on every run (default).
-
on_create only sets the password when the user is first created.
-
-
- - -Notes ------ - -.. note:: - - Requires ``ansible_connection=httpapi`` with the VyOS httpapi plugin. - - ``ansible_network_os`` must be set to ``vyos.rest.vyos``. - - The ``vyos`` user cannot be deleted as it is required for API access. - - Passwords are hashed immediately by VyOS and cannot be read back. - - - -Examples --------- - -.. code-block:: yaml - - - name: Create user - vyos.rest.vyos_user: - users: - - name: alice - full_name: Alice Smith - password: securepassword - update_password: on_create - state: present - - - name: Add SSH public key - vyos.rest.vyos_user: - users: - - name: alice - public_keys: - - name: alice-laptop - type: ssh-rsa - key: AAAAB3NzaC1yc2EAAAADAQABAAAB... - state: present - - - name: Delete user - vyos.rest.vyos_user: - users: - - name: alice - state: absent - - - name: Gather all users - vyos.rest.vyos_user: - state: gathered - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- after - -
- list -
-
when changed -
User configuration after this module ran.
-
-
-
- before - -
- list -
-
always -
User configuration before this module ran.
-
-
-
- commands - -
- list -
-
always -
List of API command tuples sent to the device.
-
-
-
- gathered - -
- list -
-
when state is gathered -
Current user configuration as structured data.
-
-
-
- response - -
- dictionary -
-
always -
Raw API response.
-
-
-
- saved - -
- boolean -
-
when changed -
Whether the config was saved after changes.
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- VyOS Community (@vyos) diff --git a/docs/vyos.rest.vyos_vlan_module.rst b/docs/vyos.rest.vyos_vlan_module.rst deleted file mode 100644 index 06ca1ab..0000000 --- a/docs/vyos.rest.vyos_vlan_module.rst +++ /dev/null @@ -1,303 +0,0 @@ -.. _vyos.rest.vyos_vlan_module: - - -******************* -vyos.rest.vyos_vlan -******************* - -**Manage VLAN (vif) configuration on VyOS devices using REST API** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manages VLAN sub-interface configuration on VyOS Ethernet interfaces via the REST API. -- Uses REST API (``connection=httpapi``) instead of CLI. - - - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- config - -
- list - / elements=dictionary -
-
- -
List of VLAN configurations.
-
-
- address - -
- string -
-
- -
IP address for the VLAN interface.
-
-
- description - -
- string -
-
- -
VLAN description.
-
-
- interfaces - -
- list - / elements=string - / required -
-
- -
List of Ethernet interfaces to configure this VLAN on.
-
-
- vlan_id - -
- integer - / required -
-
- -
VLAN ID (0-4094).
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
  • gathered
  • -
-
-
present creates or updates VLANs.
-
absent removes VLANs.
-
gathered returns current VLAN configuration.
-
-
- - -Notes ------ - -.. note:: - - Requires ``ansible_connection=httpapi`` with the VyOS httpapi plugin. - - ``ansible_network_os`` must be set to ``vyos.rest.vyos``. - - - -Examples --------- - -.. code-block:: yaml - - - name: Configure VLANs - vyos.rest.vyos_vlan: - config: - - vlan_id: 10 - description: VLAN10 - address: 192.168.10.1/24 - interfaces: - - eth1 - - vlan_id: 20 - description: VLAN20 - interfaces: - - eth1 - - eth2 - state: present - - - name: Remove a VLAN - vyos.rest.vyos_vlan: - config: - - vlan_id: 10 - interfaces: - - eth1 - state: absent - - - name: Gather VLAN configuration - vyos.rest.vyos_vlan: - state: gathered - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- after - -
- list -
-
when changed -
VLAN configuration after this module ran.
-
-
-
- before - -
- list -
-
always -
VLAN configuration before this module ran.
-
-
-
- commands - -
- list -
-
always -
List of API command tuples sent to the device.
-
-
-
- gathered - -
- list -
-
when state is gathered -
Current VLAN configuration as structured data.
-
-
-
- response - -
- dictionary -
-
always -
Raw API response.
-
-
-
- saved - -
- boolean -
-
when changed -
Whether the config was saved after changes.
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- VyOS Community (@vyos) -- cgit v1.2.3