-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
8 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
# @param package_ensure the ensure state of the package | ||
# @param config_directory the path to the wireguard directory | ||
# @param purge_unknown_keys by default Puppet will purge unknown wireguard keys from `$config_directory` | ||
# @param interfaces hash of interfaces to create. Provides hiera integration. | ||
# | ||
# @author Tim Meusel <[email protected]> | ||
# | ||
|
@@ -15,6 +16,7 @@ | |
Enum['installed', 'latest', 'absent'] $package_ensure = 'installed', | ||
Stdlib::Absolutepath $config_directory = '/etc/wireguard', | ||
Boolean $purge_unknown_keys = true, | ||
Hash[String[1], Any] $interfaces = {}, | ||
) { | ||
if $manage_package { | ||
package { 'wireguard-tools': | ||
|
@@ -39,4 +41,10 @@ | |
group => 'systemd-network', | ||
* => $options, | ||
} | ||
|
||
$interfaces.each |$interfacename, $interfaceattributes| { | ||
wireguard::interface { $interfacename: | ||
* => $interfaceattributes, | ||
} | ||
} | ||
} |