Skip to content

Commit

Permalink
Removed new_resource.updated_by_last_action occurences
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Maurice committed Jan 19, 2017
1 parent f9b773d commit d534851
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions providers/pool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,21 @@ def whyrun_supported?
command cmd
end
configure
new_resource.updated_by_last_action(true)
Chef::Log.info('App pool created')
else
Chef::Log.debug("#{new_resource} pool already exists - nothing to do")
end
end

action :config do
new_resource.updated_by_last_action(true) if configure
configure
end

action :delete do
if @current_resource.exists
execute "Deleting the IIS pool #{new_resource.pool_name}" do
command "#{appcmd(node)} delete apppool \"#{site_identifier}\""
end
new_resource.updated_by_last_action(true)
Chef::Log.info("#{new_resource} deleted")
else
Chef::Log.debug("#{new_resource} pool does not exist - nothing to do")
Expand All @@ -74,7 +72,6 @@ def whyrun_supported?
execute "Starting IIS pool #{site_identifier}" do
command "#{appcmd(node)} start apppool \"#{site_identifier}\""
end
new_resource.updated_by_last_action(true)
Chef::Log.info("#{new_resource} started")
else
Chef::Log.debug("#{new_resource} already running - nothing to do")
Expand All @@ -86,7 +83,6 @@ def whyrun_supported?
execute "Stopping the IIS pool #{new_resource.pool_name}" do
command "#{appcmd(node)} stop apppool \"#{site_identifier}\""
end
new_resource.updated_by_last_action(true)
Chef::Log.info("#{new_resource} stopped")
else
Chef::Log.debug("#{new_resource} already stopped - nothing to do")
Expand All @@ -101,15 +97,13 @@ def whyrun_supported?
execute "Starting the IIS pool #{site_identifier}" do
command "#{appcmd(node)} start apppool \"#{site_identifier}\""
end
new_resource.updated_by_last_action(true)
Chef::Log.info("#{new_resource} restarted")
end

action :recycle do
execute "Recycling the IIS pool #{new_resource.pool_name}" do
command "#{appcmd(node)} recycle APPPOOL \"#{site_identifier}\""
end
new_resource.updated_by_last_action(true)
Chef::Log.info("#{new_resource} recycled")
end

Expand Down

0 comments on commit d534851

Please sign in to comment.