Puppet Class: quagga::pim

Defined in:
manifests/pim.pp

Summary

Manage Quagga Protocol Independent Multicasting (PIM)

Overview

Parameters:

  • agentx (Boolean)

    manage the SNMP agentx for PIM

  • config_file (Stdlib::Unixpath) (defaults to: "${quagga::config_dir}/pimd.conf")

    configuration file of the PIM servie

  • config_file_manage (Boolean)

    enable management of the PIM service setting file.

  • service_name (String)

    the name of the PIM service.

  • service_enable (Boolean)

    enable the PIM service.

  • service_manage (Boolean)

    enable management of the PIM service.

  • service_ensure (Enum['running', 'stopped'])

    the state of the PIM Service.

  • service_opts (String)

    service start options.

  • router (Hash)

    PIM router options. See the type [‘quagga_pim_router`](#quagga_pim_router).

  • interfaces (Hash)

    OSPF parameters of interfaces. See the type [‘quagga_pim_interface`](#quagga_pim_interface).

  • frr_mode_enable (Boolean)


14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'manifests/pim.pp', line 14

class quagga::pim (
  Boolean $agentx,
  Boolean $config_file_manage,
  String $service_name,
  Boolean $service_enable,
  Boolean $service_manage,
  Boolean $frr_mode_enable,
  Enum['running', 'stopped'] $service_ensure,
  String $service_opts,
  Hash $router,
  Hash $interfaces,
  Stdlib::Unixpath $config_file               = "${quagga::config_dir}/pimd.conf",
) {
  include quagga::pim::config
  include quagga::pim::service

  if $service_enable and $service_ensure == 'running' {
    $agentx_ensure = $agentx ? {
      true  => 'present',
      false => 'absent'
    }

    file_line { 'pim_agentx':
      ensure => $agentx_ensure,
      path   => $config_file,
      line   => 'agentx',
    }

    if $service_manage {
      File_line['pim_agentx'] {
        notify => Service[$service_name]
      }
    }

    quagga_pim_router { 'pim':
      * => $router,
    }

    $interfaces.each |String $interface_name, Hash $interface| {
      quagga_pim_interface { $interface_name:
        * => $interface,
      }
    }
  }
}