Book Image

Mastering Ansible

Book Image

Mastering Ansible

Overview of this book

Table of Contents (16 chapters)

Chapter 4. Controlling Task Conditions

Ansible fundamentally operates on the concept of task statuses: Ok, Changed, Failed, or Skipped. These statuses determine whether any further tasks should be executed on a host, and whether handlers should be notified due of any changes. Tasks can also make use of conditionals that check the status of previous tasks to control operation.

In this chapter, we'll explore ways to influence Ansible when determining the task status:

  • Controlling what defines a failure

  • Controlling what defines a change