Skip to content

Commit

Permalink
Add some comments to wgquick config file
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianrakel committed Aug 8, 2022
1 parent 7bc81b7 commit cd03a20
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
22 changes: 11 additions & 11 deletions manifests/interface.pp
Original file line number Diff line number Diff line change
Expand Up @@ -177,21 +177,21 @@
case $provider {
'systemd': {
wireguard::provider::systemd { $interface :
interface => $interface,
peers => $peers + $peer,
dport => $dport,
addresses => $addresses,
description => $description,
mtu => $mtu,
routes => $routes,
interface => $interface,
peers => $peers + $peer,
dport => $dport,
addresses => $addresses,
description => $description,
mtu => $mtu,
routes => $routes,
}
}
'wgquick': {
wireguard::provider::wgquick { $interface :
interface => $interface,
peers => $peers + $peer,
dport => $dport,
addresses => $addresses,
interface => $interface,
peers => $peers + $peer,
dport => $dport,
addresses => $addresses,
}
}
default: {
Expand Down
4 changes: 4 additions & 0 deletions templates/wireguard_conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Array[Hash] $addresses,
Optional[String[1]] $preshared_key,
| -%>
# THIS FILE IS MANAGED BY PUPPET
[Interface]
<% $addresses.each |$address| { -%>
Address = <%= $address['Address'] %>
Expand All @@ -13,6 +14,9 @@ ListenPort = <%= $dport %>
PostUp = wg set %i private-key /etc/wireguard/<%= $interface %>
<% $peers.each |$peer| { -%>

<% if $peer['description'] { -%>
# <%= $peer['description'] %>
<% } -%>
[Peer]
PublicKey=<%= $peer['public_key'] %>
<% if $peer['endpoint'] { -%>
Expand Down

0 comments on commit cd03a20

Please sign in to comment.