X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/18e12b0e123fc3e5f344682f884feabc12da0f5a..10f47e9c11e9d0b2a449b0bda09c597824734bb8:/cookbooks/openvpn/recipes/default.rb diff --git a/cookbooks/openvpn/recipes/default.rb b/cookbooks/openvpn/recipes/default.rb index 060e8e5ee..c027466f1 100644 --- a/cookbooks/openvpn/recipes/default.rb +++ b/cookbooks/openvpn/recipes/default.rb @@ -1,8 +1,8 @@ # -# Cookbook Name:: openvpn +# Cookbook:: openvpn # Recipe:: default # -# Copyright 2012, OpenStreetMap Foundation +# Copyright:: 2012, OpenStreetMap Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -49,13 +49,13 @@ node[:openvpn][:tunnels].each do |name, details| end if File.exist?("/etc/openvpn/#{name}.key") - node.normal[:openvpn][:keys][name] = IO.read("/etc/openvpn/#{name}.key") + node.default[:openvpn][:keys][name] = IO.read("/etc/openvpn/#{name}.key") end elsif peer && peer[:openvpn] file "/etc/openvpn/#{name}.key" do owner "root" group "root" - mode 0o600 + mode "600" content peer[:openvpn][:keys][name] end end @@ -65,7 +65,7 @@ node[:openvpn][:tunnels].each do |name, details| source "tunnel.conf.erb" owner "root" group "root" - mode 0o644 + mode "644" variables :name => name, :address => node[:openvpn][:address], :port => node[:openvpn][:tunnels][name][:port],