Fix more uses of deprecated features
authorTom Hughes <tom@compton.nu>
Wed, 24 Aug 2016 19:18:26 +0000 (20:18 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 24 Aug 2016 19:18:26 +0000 (20:18 +0100)
cookbooks/mailman/recipes/default.rb
cookbooks/mediawiki/providers/site.rb
cookbooks/openvpn/recipes/default.rb
cookbooks/web/recipes/backend.rb
cookbooks/web/recipes/base.rb
cookbooks/wordpress/providers/site.rb

index ac0ba6c..7dab375 100644 (file)
@@ -23,7 +23,7 @@ include_recipe "apache::ssl"
 
 package "mailman"
 
-node.set_unless[:mailman][:subscribe_form_secret] = SecureRandom.base64(48)
+node.normal_unless[:mailman][:subscribe_form_secret] = SecureRandom.base64(48)
 
 template "/etc/mailman/mm_cfg.py" do
   source "mm_cfg.py.erb"
index a3278cc..2548e5c 100644 (file)
@@ -28,12 +28,12 @@ end
 use_inline_resources
 
 action :create do
-  node.set_unless[:mediawiki][:sites][new_resource.name] = {}
+  node.normal_unless[:mediawiki][:sites][new_resource.name] = {}
 
-  node.set[:mediawiki][:sites][new_resource.name][:directory] = site_directory
-  node.set[:mediawiki][:sites][new_resource.name][:version] = new_resource.version
+  node.normal[:mediawiki][:sites][new_resource.name][:directory] = site_directory
+  node.normal[:mediawiki][:sites][new_resource.name][:version] = new_resource.version
 
-  node.set_unless[:mediawiki][:sites][new_resource.name][:wgSecretKey] = SecureRandom.base64(48)
+  node.normal_unless[:mediawiki][:sites][new_resource.name][:wgSecretKey] = SecureRandom.base64(48)
 
   mysql_user "#{new_resource.database_user}@localhost" do
     password new_resource.database_password
index fcee67d..29bea6d 100644 (file)
@@ -49,7 +49,7 @@ node[:openvpn][:tunnels].each do |name, details|
     end
 
     if File.exist?("/etc/openvpn/#{name}.key")
-      node.set[:openvpn][:keys][name] = IO.read("/etc/openvpn/#{name}.key")
+      node.normal[:openvpn][:keys][name] = IO.read("/etc/openvpn/#{name}.key")
     end
   elsif peer && peer[:openvpn]
     file "/etc/openvpn/#{name}.key" do
index ae359ca..38515b0 100644 (file)
@@ -39,4 +39,4 @@ apache_site "www.openstreetmap.org" do
   variables :secret_key_base => web_passwords["secret_key_base"]
 end
 
-node.set[:memcached][:ip_address] = node.internal_ipaddress
+node.normal[:memcached][:ip_address] = node.internal_ipaddress
index d5b30ba..6b70cb7 100644 (file)
@@ -17,7 +17,7 @@
 # limitations under the License.
 #
 
-node.set[:nfs]["/store/rails"] = {
+node.default[:nfs]["/store/rails"] = {
   :host => node[:web][:fileserver],
   :path => "/store/rails"
 }
index a664b0e..36b6f5a 100644 (file)
@@ -30,18 +30,18 @@ use_inline_resources
 action :create do
   version = new_resource.version || Chef::Wordpress.current_version
 
-  node.set_unless[:wordpress][:sites][new_resource.name] = {}
-
-  node.set[:wordpress][:sites][new_resource.name][:directory] = site_directory
-
-  node.set_unless[:wordpress][:sites][new_resource.name][:auth_key] = SecureRandom.base64(48)
-  node.set_unless[:wordpress][:sites][new_resource.name][:secure_auth_key] = SecureRandom.base64(48)
-  node.set_unless[:wordpress][:sites][new_resource.name][:logged_in_key] = SecureRandom.base64(48)
-  node.set_unless[:wordpress][:sites][new_resource.name][:nonce_key] = SecureRandom.base64(48)
-  node.set_unless[:wordpress][:sites][new_resource.name][:auth_salt] = SecureRandom.base64(48)
-  node.set_unless[:wordpress][:sites][new_resource.name][:secure_auth_salt] = SecureRandom.base64(48)
-  node.set_unless[:wordpress][:sites][new_resource.name][:logged_in_salt] = SecureRandom.base64(48)
-  node.set_unless[:wordpress][:sites][new_resource.name][:nonce_salt] = SecureRandom.base64(48)
+  node.normal_unless[:wordpress][:sites][new_resource.name] = {}
+
+  node.normal[:wordpress][:sites][new_resource.name][:directory] = site_directory
+
+  node.normal_unless[:wordpress][:sites][new_resource.name][:auth_key] = SecureRandom.base64(48)
+  node.normal_unless[:wordpress][:sites][new_resource.name][:secure_auth_key] = SecureRandom.base64(48)
+  node.normal_unless[:wordpress][:sites][new_resource.name][:logged_in_key] = SecureRandom.base64(48)
+  node.normal_unless[:wordpress][:sites][new_resource.name][:nonce_key] = SecureRandom.base64(48)
+  node.normal_unless[:wordpress][:sites][new_resource.name][:auth_salt] = SecureRandom.base64(48)
+  node.normal_unless[:wordpress][:sites][new_resource.name][:secure_auth_salt] = SecureRandom.base64(48)
+  node.normal_unless[:wordpress][:sites][new_resource.name][:logged_in_salt] = SecureRandom.base64(48)
+  node.normal_unless[:wordpress][:sites][new_resource.name][:nonce_salt] = SecureRandom.base64(48)
 
   mysql_user "#{new_resource.database_user}@localhost" do
     password new_resource.database_password