mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
Merge pull request #12359 from cchurch/fetch_no_fail_on_missing
Fix fetch to not fail for missing file when fail_if_missing=False
This commit is contained in:
commit
3f8e12d1f7
2 changed files with 32 additions and 1 deletions
|
@ -62,6 +62,8 @@ class ActionModule(ActionBase):
|
|||
if remote_checksum in ('1', '2') or self._play_context.become:
|
||||
slurpres = self._execute_module(module_name='slurp', module_args=dict(src=source), task_vars=task_vars, tmp=tmp)
|
||||
if slurpres.get('failed'):
|
||||
if remote_checksum == '1' and not fail_on_missing:
|
||||
return dict(msg="the remote file does not exist, not transferring, ignored", file=source, changed=False)
|
||||
return slurpres
|
||||
else:
|
||||
if slurpres['encoding'] == 'base64':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue