Puppet Class: quagga::ospf

Defined in:
manifests/ospf.pp

Summary

Manage the Quagga OSPF daemon

Overview

Parameters:

  • agentx (Boolean)

    Manage the AgentX integration

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

    configuration file of the OSPF service.

  • config_file_manage (Boolean)

    Manage the configuration file content

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

    Controls whether the service is stopped or running.

  • service_name (String)

    the name of the OSPF service

  • service_enable (Boolean)

    Enable the OSPF service

  • service_manage (Boolean)

    Enable management of the OSPF service

  • service_opts (String)

    Service start options

  • router (Hash)

    OSPF router options.

  • areas (Hash)

    OSPF area options.

  • frr_mode_enable (Boolean)
  • interfaces (Hash)

See Also:

  • quagga_ospf_router
  • @param interfaces OSPF parameters of interfaces.
  • quagga_ospf_interface


40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'manifests/ospf.pp', line 40

class quagga::ospf (
  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,
  Hash $areas,
  Stdlib::Unixpath $config_file              = "${quagga::config_dir}/ospfd.conf",
) {
  include quagga::ospf::config
  include quagga::ospf::service

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

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

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

    quagga_ospf_router { 'ospf':
      * => $router,
    }

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

    resources { 'quagga_ospf_area_range':
      purge => true,
    }

    $areas.each |String $area_name, Hash $area| {
      quagga::ospf::area { $area_name:
        * => $area,
      }
    }
  }
}