Puppet Class: ipsec
- Defined in:
- manifests/init.pp
Summary
Main entry point to this module.Overview
Puppet module for IPsec
This puppet module is providing facility to install and configure ipsec settings. Currently using strongswan, it manages package installation, the contents of configuration files ipsec.secrets and ipsec.conf and controlling the service itself in order to reload configurations after changes. The module is designed to be fully configurable through parameter lookup.
Secrets are added to the ipsec.secrets file through the secrets parameter of the module. Consisting of an array of custom typed entries, all entries are added as individual secret etries. Parameter secrets_includes provides the possibility to include auxiliary secret files.
The contents of ipsec.conf, as it consists of three different types of
entries, is generated upon the fixed structure parameter named conf. As the
setup section is singleton within ipsec.conf, the conf hash only includes the actual setup key-value
pairs. Entries conf['authorities']
and
conf['connections']
are processed in a factory pattern,
creating the according resource instances, which build the actual sections
of the ipsec.conf file. The possibility of configuration fragments placed
in /etc/ipsec.d/ is not utilised.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'manifests/init.pp', line 87
class ipsec (
Enum['present', 'absent'] $ensure,
Array[Ipsec::Secret] $secrets,
Array[Stdlib::Absolutepath] $secret_includes,
Struct[{
setup => Optional[Hash[String,String]],
authorities => Optional[Hash[String,Hash]],
connections => Optional[Hash[String,Hash]],
}] $conf,
) {
contain ipsec::install
contain ipsec::config
contain ipsec::service
Class['ipsec::install']
-> Class['ipsec::config']
~> Class['ipsec::service']
}
|