mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Show other way to ignore command/shell errors
This commit is contained in:
parent
bccab0f2b7
commit
f9890c9973
1 changed files with 8 additions and 0 deletions
|
@ -222,6 +222,14 @@ who's successful exit code is not zero, you may wish to do this::
|
|||
- name: run this command and ignore the result
|
||||
action: shell /usr/bin/somecommand || /bin/true
|
||||
|
||||
Or this::
|
||||
|
||||
tasks:
|
||||
- name: run this command and ignore the result
|
||||
action: shell /usr/bin/somecommand
|
||||
ignore_errors: True
|
||||
|
||||
|
||||
If the action line is getting too long for comfort you can break it on
|
||||
a space and indent any continuation lines::
|
||||
|
||||
|
|
Loading…
Reference in a new issue