chef

https://github.com/opscode/chef

Ruby

A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.

Chef::Provider.use_inline_resources

Enables inline evaluation of resources in provider actions.

Without this option, any resources declared inside the Provider are added
to the resource collection after the current position at the time the
action is executed. Because they are added to the primary resource
collection for the chef run, they can notify other resources outside
the Provider, and potentially be notified by resources outside the Provider
(but this is complicated by the fact that they don't exist until the
provider executes). In this mode, it is impossible to correctly set the
updated_by_last_action flag on the parent Provider resource, since it
executes and returns before its component resources are run.

With this option enabled, each action creates a temporary run_context
with its own resource collection, evaluates the action's code in that
context, and then converges the resources created. If any resources
were updated, then this provider's new_resource will be marked updated.

In this mode, resources created within the Provider cannot interact with
external resources via notifies, though notifications to other
resources within the Provider will work. Delayed notifications are executed
at the conclusion of the provider's action, *not* at the end of the
main chef run.

This mode of evaluation is experimental, but is believed to be a better
set of tradeoffs than the append-after mode, so it will likely become
the default in a future major release of Chef.

Source | Google | Stack overflow

Edit

git clone [email protected]:opscode/chef.git

cd chef

open lib/chef/provider.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Chef--Provider-use_inline_resources-for-pr


# Commit to git

git add lib/chef/provider.rbgit commit -m "better docs for Chef::Provider.use_inline_resources"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Chef--Provider-use_inline_resources-for-pr

hub pull-request


# Celebrate!