From ec95f50cb6ea48810b737993e4db3672846b31ab Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 14 Jan 2016 12:28:34 -0500 Subject: [PATCH] updated docs with new test grammer examples --- docsite/rst/playbooks_conditionals.rst | 2 +- docsite/rst/playbooks_filters.rst | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docsite/rst/playbooks_conditionals.rst b/docsite/rst/playbooks_conditionals.rst index 15d397c7ac1..47cc844f457 100644 --- a/docsite/rst/playbooks_conditionals.rst +++ b/docsite/rst/playbooks_conditionals.rst @@ -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 diff --git a/docsite/rst/playbooks_filters.rst b/docsite/rst/playbooks_filters.rst index cae65d71bee..05ff830e3bf 100644 --- a/docsite/rst/playbooks_filters.rst +++ b/docsite/rst/playbooks_filters.rst @@ -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