Class Chef::RunList::RunListExpansion
In: lib/chef/run_list/run_list_expansion.rb
Parent: Object

Abstract Base class for expanding a run list. Subclasses must handle fetching roles from a data source by defining fetch_role

Methods

Attributes

default_attrs  [R] 
environment  [R] 
errors  [R] 
override_attrs  [R] 
recipes  [R]  A VersionedRecipeList of recipes. Populated only after expand is called.
run_list_items  [R] 
source  [R]  The data source passed to the constructor. Not used in this class. In subclasses, this is a couchdb or Chef::REST object pre-configured to fetch roles from their correct location.

Public Class methods

Public Instance methods

Did we find any errors (expanding roles)?

Recurses over the run list items, expanding roles. After this, recipes will contain the fully expanded recipe list

In subclasses, this method will fetch the role from the data source.

Fetches and inflates a role

Returns

Chef::Role in most cases false if the role has already been applied nil if the role does not exist

invalid?()

Alias for errors?

When a role is not found, an error message is logged, but no exception is raised. We do add an entry in the errors collection.

Returns

nil

Returns an array of role names that were expanded; this includes any roles that were in the original, pre-expansion run_list as well as roles processed during expansion. Populated only after expand is called.

[Validate]