mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fixes #4884 Do not prematurely exit from file module if src not defined
This commit is contained in:
parent
f31cb7c6e8
commit
5a3032a950
1 changed files with 2 additions and 6 deletions
|
@ -186,12 +186,8 @@ def main():
|
|||
prev_state = 'file'
|
||||
|
||||
if prev_state is not None and state is None:
|
||||
if not params.get('src', None):
|
||||
# idempotent exit if state is not specified
|
||||
module.exit_json(path=path, changed=False)
|
||||
else:
|
||||
# src is defined, need to process other operations
|
||||
state = prev_state
|
||||
# set state to current type of file
|
||||
state = prev_state
|
||||
elif state is None:
|
||||
# set default state to file
|
||||
state = 'file'
|
||||
|
|
Loading…
Reference in a new issue