From ba2582fff68ea1843d597643edcad0b2dc484565 Mon Sep 17 00:00:00 2001 From: raphinou Date: Wed, 27 Mar 2013 14:37:31 +0100 Subject: [PATCH] replaced && by || In the example, you want /bin/true to be executed if the first command has an error return code. Combining command with && will run the second only if the first is successful. Combining them with ||, the second will be run only of the first fails, what is wanted here. --- docsite/rst/playbooks.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docsite/rst/playbooks.rst b/docsite/rst/playbooks.rst index ae45c33458..0e3dc36edb 100644 --- a/docsite/rst/playbooks.rst +++ b/docsite/rst/playbooks.rst @@ -220,7 +220,7 @@ who's successful exit code is not zero, you may wish to do this:: tasks: - name: run this command and ignore the result - action: shell /usr/bin/somecommand && /bin/true + action: shell /usr/bin/somecommand || /bin/true If the action line is getting too long for comfort you can break it on a space and indent any continuation lines::