]> git.openstreetmap.org Git - chef.git/commitdiff
Strip trailing newline from public key
authorTom Hughes <tom@compton.nu>
Mon, 14 Sep 2020 16:25:21 +0000 (17:25 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 14 Sep 2020 16:25:21 +0000 (17:25 +0100)
cookbooks/networking/recipes/default.rb

index ac847bfc7cbe58df019246552d671d8e93aa89c1..117a1e3f3c2f6d97eef1d19ecfa3df75e60a593c 100644 (file)
@@ -210,7 +210,7 @@ if node[:networking][:wireguard][:enabled]
     compile_time true
   end
 
-  node.default[:networking][:wireguard][:public_key] = %x(wg pubkey < /var/lib/systemd/wireguard/private.key)
+  node.default[:networking][:wireguard][:public_key] = %x(wg pubkey < /var/lib/systemd/wireguard/private.key).chomp
 
   file "/var/lib/systemd/wireguard/preshared.key" do
     action :create_if_missing