Class: Chef::Provider::Partial
- Inherits:
-
Chef::Provider
- Object
- Chef::Provider
- Chef::Provider::Partial
- Includes:
- Garcon
- Defined in:
- lib/garcon/chef/provider/partial.rb
Constant Summary
Constants included from Garcon
Instance Method Summary collapse
- #action_run(r = new_resource) ⇒ Object
-
#load_current_resource ⇒ Chef::Provider::Partial
private
Load and return the current resource.
-
#whyrun_supported? ⇒ TrueClass, FalseClass
private
Boolean indicating if WhyRun is supported by this provider.
Methods included from Garcon
auto_terminate_all_executors?, auto_terminate_global_executors?, coercer, coercer=, config, configuration, crypto, crypto=, disable_auto_termination_of_all_executors!, disable_auto_termination_of_global_executors!, global_fast_executor, global_io_executor, global_timer_set, included, #inspect, kill_global_executors, monotonic_time, new_fast_executor, new_io_executor, physical_processor_count, processor_count, secret, secret=, shutdown_global_executors, #terminal_dimensions, timer, #to_s, wait_for_global_executors_termination, warn
Instance Method Details
#action_run(r = new_resource) ⇒ Object
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/garcon/chef/provider/partial.rb', line 72 def action_run(r = new_resource) converge_by "Executing partial run list: #{r.run_list}" do partial = r.name runner = Chef::PartialRun.new(partial, r.attributes, r.arguments) runner.partial_run(r.run_list) unless runner.run_status.updated_resources.empty? r.updated_by_last_action(true) end end if r.save node.consume_attributes(runner.clean_attrs) runner.save_updated_node end end |
#load_current_resource ⇒ Chef::Provider::Partial
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Load and return the current resource.
67 68 69 70 |
# File 'lib/garcon/chef/provider/partial.rb', line 67 def load_current_resource @current_resource ||= Chef::Resource::Partial.new(new_resource.name) @current_resource end |
#whyrun_supported? ⇒ TrueClass, FalseClass
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Boolean indicating if WhyRun is supported by this provider
58 59 60 |
# File 'lib/garcon/chef/provider/partial.rb', line 58 def whyrun_supported? true end |