From: Tom Hughes Date: Mon, 24 Sep 2018 11:42:04 +0000 (+0100) Subject: Set action to "nothing" explicitly when using passenger_application X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/7c28124864b39960cdf89b1b47c16a279fc04022?hp=3cab1d392b3c22dfcad4099df33f6ef2eccefa29 Set action to "nothing" explicitly when using passenger_application Apparently have "nothing" as the default action for a custom resource doesn't actually work, even if you define it explicitly. --- diff --git a/cookbooks/passenger/resources/application.rb b/cookbooks/passenger/resources/application.rb index 1beb4bd3e..ce0c0dc2f 100644 --- a/cookbooks/passenger/resources/application.rb +++ b/cookbooks/passenger/resources/application.rb @@ -17,13 +17,10 @@ # limitations under the License. # -default_action :nothing +default_action :restart property :application, String, :name_attribute => true -action :nothing do -end - action :restart do execute new_resource.application do action :run diff --git a/cookbooks/taginfo/recipes/default.rb b/cookbooks/taginfo/recipes/default.rb index 19c467c82..d55add755 100644 --- a/cookbooks/taginfo/recipes/default.rb +++ b/cookbooks/taginfo/recipes/default.rb @@ -172,7 +172,9 @@ node[:taginfo][:sites].each do |site| variables :name => site_name, :directory => directory end - passenger_application "#{directory}/taginfo/web/public" + passenger_application "#{directory}/taginfo/web/public" do + action :nothing + end ssl_certificate site_name do domains [site_name] + site_aliases diff --git a/cookbooks/web/resources/rails_port.rb b/cookbooks/web/resources/rails_port.rb index 067c1334c..913f0a17f 100644 --- a/cookbooks/web/resources/rails_port.rb +++ b/cookbooks/web/resources/rails_port.rb @@ -346,6 +346,7 @@ action :create do end passenger_application rails_directory do + action :nothing only_if { ::File.exist?("/usr/bin/passenger-config") } end