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 ac0ba6c8f318a78f34829db1e1954d9d1b9cf731..7dab375eb56feac05eb98b7e0cf8434c92cf7b39 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 a3278cc0d84c4cbd16e4024290c73be2ffc9ab8d..2548e5c747ca1352e2b67a5cdb1be790403ed32c 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 fcee67dd2f7e0a246d97459be63aeca8ac8edbc1..29bea6d28528260fb281682e1a706875221a6d0d 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 ae359ca472d86d51ccc6df056cad1d180f6bdeab..38515b07aed8ff36f58896254878fd7338e6299e 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 d5b30ba66e856985e8e741a0c684dca24829e96a..6b70cb702e721407a5277a5c5faf6a2aeb7e1e67 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 a664b0ea8e85584026ca01574decb1929c8167d4..36b6f5a3be050f15ae935a02f4afa0c50fc8f820 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