215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
|
# File 'lib/chef/provider.rb', line 215
def run_action(action = nil)
@action = action unless action.nil?
check_resource_semantics!
validate_required_properties!
if whyrun_mode? && !whyrun_supported?
events.resource_current_state_load_bypassed(@new_resource, @action, @current_resource)
else
load_current_resource
events.resource_current_state_loaded(@new_resource, @action, @current_resource)
end
define_resource_requirements
process_resource_requirements
if whyrun_mode? && (!whyrun_supported? || requirements.action_blocked?(@action))
events.resource_bypassed(@new_resource, @action, self)
else
send("action_#{@action}")
end
set_updated_status
cleanup_after_converge
load_after_resource
events.resource_after_state_loaded(@new_resource, @action, @after_resource)
end
|