-
-
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
1 parent
c1ce989
commit 7d07327
Showing
2 changed files
with
15 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
# @param description an optional string that will be added to the wireguard network interface | ||
# @param mtu configure the MTU (maximum transision unit) for the wireguard tunnel. By default linux will figure this out. You might need to lower it if you're connection through a DSL line. MTU needs to be equal on both tunnel endpoints | ||
# @param peers is an array of struct (Wireguard::Peers) for multiple peers | ||
# @param routes different routes for the systemd-networkd configuration | ||
# | ||
# @author Tim Meusel <[email protected]> | ||
# @author Sebastian Rakel <[email protected]> | ||
|
@@ -87,6 +88,7 @@ | |
Optional[String[1]] $description = undef, | ||
Optional[Integer[1280, 9000]] $mtu = undef, | ||
Optional[String[1]] $public_key = undef, | ||
Optional[Array[Hash]] $routes = undef, | ||
) { | ||
require wireguard | ||
|
@@ -156,7 +158,12 @@ | |
} | ||
systemd::network { "${interface}.network": | ||
content => epp("${module_name}/network.epp", { 'interface' => $interface, 'addresses' => $addresses }), | ||
content => epp("${module_name}/network.epp", | ||
{ | ||
'interface' => $interface, | ||
'addresses' => $addresses, | ||
'routes' => $routes, | ||
}), | ||
restart_service => true, | ||
owner => 'root', | ||
group => 'systemd-network', | ||
|
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