Commit 5a3032a9 by James Tanner

Fixes #4884 Do not prematurely exit from file module if src not defined

parent f31cb7c6
...@@ -186,12 +186,8 @@ def main(): ...@@ -186,12 +186,8 @@ def main():
prev_state = 'file' prev_state = 'file'
if prev_state is not None and state is None: if prev_state is not None and state is None:
if not params.get('src', None): # set state to current type of file
# idempotent exit if state is not specified state = prev_state
module.exit_json(path=path, changed=False)
else:
# src is defined, need to process other operations
state = prev_state
elif state is None: elif state is None:
# set default state to file # set default state to file
state = 'file' state = 'file'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment