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