.. _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 OSPFv2 (IPv4) and OSPFv3 (IPv6) per-interface configuration on VyOS devices via the REST API. Parameters ---------- .. raw:: html
Parameter Choices/Defaults Comments
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.
area
string
OSPF area to assign this interface to (set protocols ospf interface <name> area <id> for OSPFv2, set protocols ospfv3 interface <name> area <id> for OSPFv3). This is a per-interface alternative to enabling OSPF via area <id> network <prefix> -- VyOS's own documentation frames the network-based form as standard and this per-interface form as more convenient in some cases (many interfaces/subnets). Confirmed via VyOS's official documentation across 1.4+/1.5 LTS/rolling as the current syntax, distinct from and superseding the older (1.3-era) area <id> interface <name> form.
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 Mbit/s (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 mismatch detection.
network
string
    Choices:
  • broadcast
  • non-broadcast
  • point-to-multipoint
  • point-to-point
Network type.
passive
boolean
    Choices:
  • no
  • yes
Suppress adjacency formation on this interface.
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``. See Also -------- .. seealso:: :ref:`vyos.vyos.vyos_ospf_interfaces_module` The official documentation on the **vyos.vyos.vyos_ospf_interfaces** module. Examples -------- .. code-block:: yaml - name: Merge OSPF interface configuration vyos.rest.vyos_ospf_interfaces: config: - name: eth1 address_family: - afi: ipv4 cost: 100 state: merged Return Values ------------- Common return values are documented `here `_, the following are the fields unique to this module: .. raw:: html
Key Returned Description
after
list
when changed
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)