.. _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
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.
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
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)