Version information
This version is compatible with:
- Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
- Puppet >= 4.10.0 < 8.0.0
Start using this module
Add this module to your Puppetfile:
mod 'cirrax-openospfd', '0.1.1'
Learn more about managing modules with a PuppetfileDocumentation
Puppet module for openospfd and openospf6d
Table of Contents
Description
This module will configure openspfd and openospf6d.
Usage
Include the main class and configure the parameters according to reference in your're hiera database.
In the default setup, ospfd and ospf6d is configured, if you like to configure only one or the other, you should set openospfd::include_ospfd and/or openospfd::include_ospfd6 to false.
An Example hiera configuration could be:
openospfd::ospfd::redistribute:
- value: '10.0.0.0/8'
openospfd::ospf6d::redistribute:
- value: '2a03:580:ffff::/48'
# area to use for ospfd and ospf6d
# for different areas, you coud use opensospfd::ospfd::areass and
# openospfd::ospf6d::areas.
openospfd::areas:
0.0.0.0:
config:
demote: 'carp'
interfaces:
vio4: {}
vlan42:
config:
metric: '5'
carp5:
passive: true
Reference
see REFERENCE.md file or the documented parameters in the classes/defines.
TODO
Unfortunatly no spec tests yet!
Contributing
Please report bugs and feature request using GitHub issue tracker.
For pull requests, it is very much appreciated to check your Puppet manifest with puppet-lint and the available spec tests in order to follow the recommended Puppet style guidelines from the Puppet Labs style guide.
Authors
This module is mainly written by Cirrax GmbH.
See the list of contributors for a list of all contributors.
Reference
Table of Contents
Classes
openospfd
: main class to configure openospfdopenospfd::ospf6d
: main class to configure ospf6dopenospfd::ospfd
: main class to configure ospfd
Defined types
openospfd::area
: add an area to the configopenospfd::interface
: add an interface to an area
Classes
openospfd
This is the main class to configure openospfd. Parameters set here are used as defaults for ospfd and ospf6d configuration. They can all be overwritten in opfd respective ospf6d class.
Examples
include openospfd
Parameters
The following parameters are available in the openospfd
class:
include_ospfd
include_ospf6d
owner
group
areas
router_id
rdomain
rtable
macros
global_config
rcconffile
interfaces
include_ospfd
Data type: Boolean
whether to include/configure ospfd
Default value: true
include_ospf6d
Data type: Boolean
whether to include/configure ospf6d
Default value: true
owner
Data type: String
owner of the configuration files
Default value: 'root'
group
Data type: String
group of the configuration files
Default value: 'wheel'
areas
Data type: Hash
areas to set up this Hash is used to run openospfd::area resource
Default value: {}
router_id
Data type: Optional[String]
the router-id
Default value: undef
rdomain
Data type: Optional[String]
the rdomain to set
Default value: undef
rtable
Data type: Optional[String]
the rdomain to start in (set ospfd_rtable in rc.conf.local)
Default value: undef
macros
Data type: Hash
Hash of macros to define
Default value: {}
global_config
Data type: Hash
Hash of global configurations
Default value: {}
rcconffile
Data type: String
the rc.conf file to write startup parameters into
Default value: '/etc/rc.conf.local'
interfaces
Data type: Hash
default interfaces to add to the area (using openospfd::interface) for detailed interface options see openospfd::interface
Default value: {}
openospfd::ospf6d
This class configures ospfd. It takes default values from ::openospfd class
Parameters
The following parameters are available in the openospfd::ospf6d
class:
config_file
service_name
service_ensure
service_enable
validate_cmd
areas
router_id
rdomain
rtable
macros
global_config
redistribute
config_file
Data type: String
Default value: '/etc/ospf6d.conf'
service_name
Data type: String
the name of the ospfd service
Default value: 'ospf6d'
service_ensure
Data type: String
what we ensure for the service
Default value: 'running'
service_enable
Data type: String
should the service be enabled
Default value: 'true'
validate_cmd
Data type: String
command to validate the configuration file
Default value: '/usr/sbin/ospf6d -nf %'
areas
Data type: Optional[Hash]
Hash of areas to set up with openospfd::area resource.
Default value: undef
router_id
Data type: Optional[String]
the router-id
Default value: undef
rdomain
Data type: Optional[String]
the rdomain to set
Default value: undef
rtable
Data type: Optional[String]
the rdomain to start in (set ospfd_rtable in rc.conf.local)
Default value: undef
macros
Data type: Optional[Hash]
Hash of macros to define
Default value: undef
global_config
Data type: Optional[Hash]
Hash of global configurations
Default value: undef
redistribute
Data type: Optional[Array]
Array of hashes for redistribute vals one hash has the following keys available: value: one of static|connected|default or a prefix or 'rtlabel label' set: hash of settings (eg metric: 300) depend: interface name to depend on negativ: boolean, if set to true, the rule is a 'no redistribute' rule' exampel in yaml notation:
- value: 'static' set: metric: '300' type: '2' depend: 'carp3'
Default value: []
openospfd::ospfd
This class configures ospfd. It takes default values from ::openospfd class
Parameters
The following parameters are available in the openospfd::ospfd
class:
config_file
service_name
service_ensure
service_enable
validate_cmd
areas
router_id
rdomain
rtable
macros
global_config
redistribute
config_file
Data type: String
Default value: '/etc/ospfd.conf'
service_name
Data type: String
the name of the ospfd service
Default value: 'ospfd'
service_ensure
Data type: String
what we ensure for the service
Default value: 'running'
service_enable
Data type: String
should the service be enabled
Default value: 'true'
validate_cmd
Data type: String
command to validate the configuration file
Default value: '/usr/sbin/ospfd -nf %'
areas
Data type: Optional[Hash]
Hash of areas to set up with openospfd::area resource.
Default value: undef
router_id
Data type: Optional[String]
the router-id
Default value: undef
rdomain
Data type: Optional[String]
the rdomain to set
Default value: undef
rtable
Data type: Optional[String]
the rdomain to start in (set ospfd_rtable in rc.conf.local)
Default value: undef
macros
Data type: Optional[Hash]
Hash of macros to define
Default value: undef
global_config
Data type: Optional[Hash]
Hash of global configurations
Default value: undef
redistribute
Data type: Optional[Array]
Array of hashes for redistribute vals one hash has the following keys available: value: one of static|connected|default or a prefix or 'rtlabel label' set: hash of settings (eg metric: 300) depend: interface name to depend on negativ: boolean, if set to true, the rule is a 'no redistribute' rule' exampel in yaml notation:
- value: 'static' set: metric: '300' type: '2' depend: 'carp3'
- value: '10.0.0.0/8' negativ: true
Default value: []
Defined types
openospfd::area
add an area to the config
Parameters
The following parameters are available in the openospfd::area
defined type:
target
Data type: String
the target to write the area into
area_name
Data type: String
the name of the area
Default value: $title
config
Data type: Hash
area specific configuration
Default value: {}
interfaces
Data type: Hash
interfaces to add to the area (using openospfd::interface) for detailed interface options see openospfd::interface
Default value: {}
openospfd::interface
adds an interface to an area. this define is used internaly from openospfd::area (but it's also possible to use it from youre toplevel.
Parameters
The following parameters are available in the openospfd::interface
defined type:
target
Data type: String
the target file
area_name
Data type: String
the name of the area to add the interface
interface_name
Data type: String
the name of the interface to add
Default value: $title
config
Data type: Hash
the interface specific configuration
Default value: {}
passive
Data type: Boolean
set to true for passive interface
Default value: false
Dependencies
- puppetlabs/stdlib (>= 3.2.0 < 10.0.0)
- puppetlabs/concat (>= 2.0.0 < 10.0.0)