Bookmark this page

Summary

In this chapter, you learned:

  • Loops are used to iterate over a set of values, for example, a simple list of strings, or a list of either hashes or dictionaries.

  • Conditionals are used to execute tasks or plays only when certain conditions have been met.

  • Handlers are special tasks that execute at the end of the play if notified by other tasks.

  • Handlers are only notified when a task reports that it changed something on a managed host.

  • Tasks are configured to handle error conditions by ignoring task failure, forcing handlers to be called even if the task failed, mark a task as failed when it succeeded, or override the behavior that causes a task to be marked as changed.

  • Blocks are used to group tasks as a unit and to execute other tasks depending upon whether or not all the tasks in the block succeed.

Revision: rh294-8.4-9cb53f0