Permalink
Browse files

[COOK-621] - rename push -> routes

  • Loading branch information...
1 parent a34476e commit 6d5af9f606dc5135cb1740a2e72e2782860f5f0e @jtimberman jtimberman committed Dec 8, 2011
Showing with 6 additions and 2 deletions.
  1. +1 −1 openvpn/attributes/default.rb
  2. +4 −0 openvpn/recipes/default.rb
  3. +1 −1 openvpn/templates/default/Rakefile.erb
@@ -28,7 +28,7 @@
default["openvpn"]["key_dir"] = "/etc/openvpn/keys"
default["openvpn"]["signing_ca_key"] = "#{node["openvpn"]["key_dir"]}/ca.key"
default["openvpn"]["signing_ca_cert"] = "#{node["openvpn"]["key_dir"]}/ca.crt"
-default["openvpn"]["push"] = []
+default["openvpn"]["routes"] = []
# Used by helper library to generate certificates/keys
default["openvpn"]["key"]["ca_expire"] = 3650
@@ -17,6 +17,10 @@
# limitations under the License.
#
+routes = node['openvpn']['routes']
+routes << node['openvpn'] if node['openvpn'].attribute?('push')
+node.default['openvpn']['routes'] << routes.flatten!
+
key_dir = node["openvpn"]["key_dir"]
key_size = node["openvpn"]["key"]["size"]
@@ -48,7 +48,7 @@ task :client do
client
dev tun
proto udp
-remote <%= node["openvpn"]["gateway"] %> 1194
+remote <%= node["openvpn"]["gateway"] %> <%= node["openvpn"]["port"] %>
resolv-retry infinite
nobind
persist-key

0 comments on commit 6d5af9f

Please sign in to comment.