Puppet Class: quagga::bgp
- Defined in:
- manifests/bgp.pp
Summary
Manage the Quagga BGP DaemonOverview
This class is automatically included when you include the main quagga class. However, it has a number of parameters that can be set via hiera.
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 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'manifests/bgp.pp', line 50
class quagga::bgp (
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 $peers,
Hash $as_paths,
Hash $community_lists,
Hash $address_families,
Stdlib::Unixpath $config_file = "${quagga::config_dir}/bgpd.conf",
) {
include quagga::bgp::config
include quagga::bgp::service
if $service_enable and $service_ensure == 'running' {
$agentx_ensure = $agentx ? {
true => 'present',
false => 'absent'
}
file_line { 'bgp_agentx':
ensure => $agentx_ensure,
path => $config_file,
line => 'agentx',
}
if $service_manage {
File_line['bgp_agentx'] {
notify => Service[$service_name]
}
}
quagga_bgp_router { 'bgp':
* => $router,
}
$peers.each |String $peer_name, Hash $peer| {
quagga::bgp::peer { $peer_name:
* => $peer,
}
}
$as_paths.each |String $as_path_name, Hash $as_path| {
quagga_bgp_as_path { $as_path_name:
* => $as_path,
}
}
$community_lists.each |Integer $community_list_name, Hash $community_list| {
quagga_bgp_community_list { sprintf('%d', $community_list_name):
* => $community_list,
}
}
$address_families.each |String $address_family_name, Hash $address_family| {
quagga_bgp_address_family { $address_family_name:
* => $address_family,
}
}
}
}
|