Commit 6faaf410 by Toshio Kuratomi

Update conditional docs since @jimi-c got playbook includes working in 2.0

parent 61e76fd7
...@@ -119,12 +119,13 @@ Applying 'when' to roles and includes ...@@ -119,12 +119,13 @@ Applying 'when' to roles and includes
````````````````````````````````````` `````````````````````````````````````
Note that if you have several tasks that all share the same conditional statement, you can affix the conditional Note that if you have several tasks that all share the same conditional statement, you can affix the conditional
to a task include statement as below. Note this does not work with playbook includes, just task includes. All the tasks to a task include statement as below. All the tasks get evaluated, but the conditional is applied to each and every task::
get evaluated, but the conditional is applied to each and every task::
- include: tasks/sometasks.yml - include: tasks/sometasks.yml
when: "'reticulating splines' in output" when: "'reticulating splines' in output"
.. note:: In versions prior to 2.0 this worked with task includes but not playbook includes. 2.0 allows it to work with both.
Or with a role:: Or with a role::
- hosts: webservers - hosts: webservers
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment