class Chef::Provisioning::ActionHandler

Public Instance Methods

host_node() click to toggle source

A URL identifying the host node. nil if no such node.

# File lib/chef/provisioning/action_handler.rb, line 63
def host_node
end
open_stream(name) { |STDOUT| ... } click to toggle source

Open a stream which can be printed to and closed

# File lib/chef/provisioning/action_handler.rb, line 54
def open_stream(name)
  if block_given?
    yield STDOUT
  else
    STDOUT
  end
end
perform_action(description) { || ... } click to toggle source

This should perform the actual action (e.g., converge) if there is an action that needs to be done.

# File lib/chef/provisioning/action_handler.rb, line 43
def perform_action(description)
  if should_perform_actions
    result = yield
  else
    result = nil
  end
  performed_action(description)
  result
end
performed_action(description) click to toggle source
# File lib/chef/provisioning/action_handler.rb, line 37
def performed_action(description)
  Array(description).each { |d| puts d }
end
report_progress(description) click to toggle source
# File lib/chef/provisioning/action_handler.rb, line 33
def report_progress(description)
  Array(description).each { |d| puts d }
end
should_perform_actions() click to toggle source
# File lib/chef/provisioning/action_handler.rb, line 29
def should_perform_actions
  true
end
updated!() click to toggle source

This should be replaced with whatever records the update; by default it essentially does nothing here.

# File lib/chef/provisioning/action_handler.rb, line 25
def updated!
  @updated = true
end