]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/openvpn/recipes/default.rb
Update carto stylesheet to v2.33.0
[chef.git] / cookbooks / openvpn / recipes / default.rb
index 3a0bcccf5d7db1bed38dd71c2c5c4a8a7acd8313..9b96183eec2a0452acc920c24159f91d20318e72 100644 (file)
 package "openvpn"
 
 service "openvpn" do
-  action [ :enable, :start ]
+  action [:enable, :start]
   supports :status => true, :restart => true, :reload => true
   ignore_failure true
 end
 
 node[:openvpn][:tunnels].each do |name, details|
-  if peer = search(:node, "fqdn:#{details[:peer][:host]}").first
+  peer = search(:node, "fqdn:#{details[:peer][:host]}").first
+
+  if peer
     if peer[:openvpn] && !details[:peer][:address]
       node.default[:openvpn][:tunnels][name][:peer][:address] = peer[:openvpn][:address]
     end