FRR BFD

STATE: stable

TESTS: frr_bfd_general | frr_bfd_neighbor

API Docs: Plugins - Quagga

Service Docs: Dynamic Routing

FRR Docs: FRRouting (make sure you are looking at the current OPNSense package version!)

Sponsoring

Thanks to @telmich for sponsoring the development of these modules!

Prerequisites

You need to install the FRR plugin:

os-frr

You can also install it using the package module.

Definition

For basic parameters see: Basics

ansibleguy.opnsense.frr_bfd_general

Parameter

Type

Required

Default value

Aliases

Comment

enabled

bool

false

true

-

En- or disable BFD

ansibleguy.opnsense.frr_bfd_neighbor

Parameter

Type

Required

Default value

Aliases

Comment

ip

string

true

-

neighbor, address, peer_ip, peer

The neighbor IP or IP-range to manage. This field will be used to match existing entries with the provided config!

description

string

false

-

desc

Optional description for the neighbor

Examples

ansibleguy.opnsense.frr_bfd_general

- hosts: localhost
  gather_facts: no
  module_defaults:
    group/ansibleguy.opnsense.all:
      firewall: 'opnsense.template.ansibleguy.net'
      api_credential_file: '/home/guy/.secret/opn.key'

  tasks:
    - name: Example
      ansibleguy.opnsense.frr_bfd_general:
        # enabled: true

    - name: Enabling BFD
      ansibleguy.opnsense.frr_bfd_general:
        enabled: true

    - name: Disabling BFD
      ansibleguy.opnsense.frr_bfd_general:
        enabled: false

ansibleguy.opnsense.frr_bfd_neighbor

- hosts: localhost
  gather_facts: no
  module_defaults:
    group/ansibleguy.opnsense.all:
      firewall: 'opnsense.template.ansibleguy.net'
      api_credential_file: '/home/guy/.secret/opn.key'

    ansibleguy.opnsense.list:
      target: 'frr_bfd_neighbor'

  tasks:
    - name: Example
      ansibleguy.opnsense.frr_bfd_neighbor:
        ip: '10.0.0.1'
        # description: 'test1'
        # enabled: true
        # debug: false
        # state: 'present'
        # reload: true

    - name: Adding neighbor
      ansibleguy.opnsense.frr_bfd_neighbor:
        ip: '10.0.0.1'
        description: 'test2'

    - name: Disabling neighbor
      ansibleguy.opnsense.frr_bfd_neighbor:
        ip: '10.0.0.1'
        description: 'test2'
        enabled: false

    - name: Listing
      ansibleguy.opnsense.list:
      #  target: 'frr_bfd_neighbor'
      register: existing_entries

    - name: Printing neighbors
      ansible.builtin.debug:
        var: existing_entries.data

    - name: Removing neighbor 'test3'
      ansibleguy.opnsense.frr_bfd_neighbor:
        ip: '10.0.0.1'
        state: 'absent'