Module: Chef::PolicyBuilder

Defined in:
lib/chef/policy_builder.rb,
lib/chef/policy_builder/policyfile.rb,
lib/chef/policy_builder/expand_node_object.rb

Overview

PolicyBuilder contains classes that handles fetching policy from server or disk and resolving any indirection (e.g. expanding run_list).

INPUTS

  • event stream object

  • node object/run_list

  • json_attribs

  • override_runlist

OUTPUTS

  • mutated node object (implicit)

  • a new RunStatus (probably doesn’t need to be here)

  • cookbooks sync’d to disk

  • cookbook_hash is stored in run_context

Defined Under Namespace

Classes: ExpandNodeObject, Policyfile

Class Method Summary collapse

Class Method Details

.strategyObject



40
41
42
43
44
45
46
# File 'lib/chef/policy_builder.rb', line 40

def self.strategy
  if Chef::Config[:use_policyfile]
    Policyfile
  else
    ExpandNodeObject
  end
end