Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions docs/docsite/rst/playbooks_blocks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,24 @@ Another example is how to run handlers after an error occurred :
- name: run me even after an error
debug: msg='this handler runs even on error'


Conditional Execution
`````````````````````

Blocks allow groups of tasks to be skipped based on a conditional test.

.. code-block:: YAML
:caption: Block conditional execution example

tasks:
- block:
- debug: var=msg
when: true
when: true


Any and all of the tasks in the ``block`` would only be executed if the condition being tested was true.

.. seealso::

:doc:`playbooks`
Expand Down