Use && for executing next command if, and only if, command1 returns an exit status of zero.

This commit is contained in:
Philipp Grau 2012-10-15 16:56:55 +02:00
parent 036f853d42
commit 9b15b5d592

View file

@ -212,7 +212,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
Variables can be used in action lines. Suppose you defined
a variable called 'vhost' in the 'vars' section, you could do this::