mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Use && for executing next command if, and only if, command1 returns an exit status of zero.
This commit is contained in:
parent
036f853d42
commit
9b15b5d592
1 changed files with 1 additions and 1 deletions
|
@ -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::
|
||||
|
|
Loading…
Reference in a new issue