updated docs with new test grammer examples

This commit is contained in:
Brian Coca 2016-01-14 12:28:34 -05:00
parent 94fa9c2a7a
commit ec95f50cb6
2 changed files with 6 additions and 1 deletions

View file

@ -47,7 +47,7 @@ decide to do something conditionally based on success or failure::
- command: /bin/something
when: result|failed
- command: /bin/something_else
when: result|success
when: result|succeeded
- command: /bin/still/something_else
when: result|skipped

View file

@ -58,12 +58,17 @@ The following tasks are illustrative of how filters can be used with conditional
- debug: msg="it changed"
when: result|changed
- debug: msg="it succeeded in Ansible >= 2.1"
when: result|succeeded
- debug: msg="it succeeded"
when: result|success
- debug: msg="it was skipped"
when: result|skipped
.. note:: From 2.1 You can also use success, failure, change, skip so the grammer matches, for those that want to be strict about it.
.. _forcing_variables_to_be_defined:
Forcing Variables To Be Defined