class Chef::Provider::Partial

Public Instance Methods

action_run(r = new_resource) click to toggle source
# 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() click to toggle source

Load and return the current resource.

@return [Chef::Provider::Partial]

@api private

# 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?() click to toggle source

Boolean indicating if WhyRun is supported by this provider

@return [TrueClass, FalseClass]

@api private

# File lib/garcon/chef/provider/partial.rb, line 58
def whyrun_supported?
  true
end