From: Tom Hughes Date: Mon, 27 Nov 2017 15:20:13 +0000 (+0000) Subject: Qualify property names X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/7b058886e60a6ee9ac09bc07a3bfd3ed048a40a0 Qualify property names --- diff --git a/cookbooks/python/resources/package.rb b/cookbooks/python/resources/package.rb index e2cab899a..7dddd17af 100644 --- a/cookbooks/python/resources/package.rb +++ b/cookbooks/python/resources/package.rb @@ -24,7 +24,7 @@ property :version, :kind_of => String property :python_version, :kind_of => String action :install do - if version.nil? + if new_resource.version.nil? execute "pip-install-#{new_resource.package_name}" do command "#{pip_command} install #{new_resource.package_name}" not_if "#{pip_command} show #{new_resource.package_name}" diff --git a/cookbooks/web/resources/rails_port.rb b/cookbooks/web/resources/rails_port.rb index 56fd163c3..d7f2e012d 100644 --- a/cookbooks/web/resources/rails_port.rb +++ b/cookbooks/web/resources/rails_port.rb @@ -147,7 +147,7 @@ action :create do application_yml = edit_file "#{rails_directory}/config/example.application.yml" do |line| line.gsub!(/^( *)server_protocol:.*$/, "\\1server_protocol: \"https\"") - line.gsub!(/^( *)server_url:.*$/, "\\1server_url: \"#{name}\"") + line.gsub!(/^( *)server_url:.*$/, "\\1server_url: \"#{new_resource.site}\"") line.gsub!(/^( *)#publisher_url:.*$/, "\\1publisher_url: \"https://plus.google.com/111953119785824514010\"") @@ -159,7 +159,7 @@ action :create do line.gsub!(/^( *)email_return_path:.*$/, "\\1email_return_path: \"bounces@openstreetmap.org\"") - line.gsub!(/^( *)status:.*$/, "\\1status: :#{status}") + line.gsub!(/^( *)status:.*$/, "\\1status: :#{new_resource.status}") if new_resource.messages_domain line.gsub!(/^( *)#messages_domain:.*$/, "\\1messages_domain: \"#{new_resource.messages_domain}\"") @@ -352,7 +352,7 @@ action :create do only_if { ::File.exist?("/usr/bin/passenger-config") } end - template "/etc/cron.daily/rails-#{name.tr('.', '-')}" do + template "/etc/cron.daily/rails-#{new_resource.site.tr('.', '-')}" do cookbook "web" source "rails.cron.erb" owner "root"