.. _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
Parameter Choices/Defaults Comments
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
Key Returned Description
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)