Running on Error

The following will perform the second task only if the first one errors:

- get: foo
- task: unit
  file: foo/unit.yml
    task: alert
    file: foo/alert.yml on_error step hook

Any step can have on_error tacked onto it, whose value is a second step to execute only if the parent step errors.

on_error: step

The step to execute when the parent step errors. If the attached step fails, the outer step is considered to have failed.