X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/7f6415938eb888893b49cc968a5c01082743b7d7..261e7e9cd1a9882faa4ed7087b5902ebafe25988:/cookbooks/apache/definitions/apache_module.rb diff --git a/cookbooks/apache/definitions/apache_module.rb b/cookbooks/apache/definitions/apache_module.rb index 4ac89432d..beb43b2ef 100644 --- a/cookbooks/apache/definitions/apache_module.rb +++ b/cookbooks/apache/definitions/apache_module.rb @@ -41,7 +41,7 @@ define :apache_module, :action => [ :install, :enable ], :variables => {} do mode 0644 variables params[:variables] if File.exists?("/etc/apache2/mods-enabled/#{name}.load") - notifies :reload, resources(:service => "apache2") + notifies :reload, "service[apache2]" end end end @@ -50,13 +50,13 @@ define :apache_module, :action => [ :install, :enable ], :variables => {} do if module_action.include?(:enable) execute "a2enmod-#{name}" do command "/usr/sbin/a2enmod #{name}" - notifies :restart, resources(:service => "apache2") + notifies :restart, "service[apache2]" not_if { File.exists?("/etc/apache2/mods-enabled/#{name}.load") } end elsif module_action.include?(:disable) or module_action.include?(:remove) execute "a2dismod-#{name}" do command "/usr/sbin/a2dismod #{name}" - notifies :restart, resources(:service => "apache2") + notifies :restart, "service[apache2]" only_if { File.exists?("/etc/apache2/mods-enabled/#{name}.load") } end end