]> git.openstreetmap.org Git - chef.git/commitdiff
Configure v4 address for wireguard endpoints with an internal address
authorTom Hughes <tom@compton.nu>
Mon, 14 Sep 2020 18:24:38 +0000 (19:24 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 14 Sep 2020 18:24:38 +0000 (19:24 +0100)
cookbooks/networking/templates/default/wireguard.network.erb

index b8114382ca95519844db9ce3c6c3fb624acdf0bb..2d3469cf16741a16f4c144aabfb99aea77cd156f 100644 (file)
@@ -2,6 +2,9 @@
 Name=wg0
 
 [Network]
+<% if node.internal_ipaddress -%>
+Address=<%= node.internal_ipaddress %>/32
+<% end -%>
 Address=<%= node[:networking][:wireguard][:address] %>/128
 
 [Route]