mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-04 01:33:09 +00:00
Added prev_state for directory
This commit is contained in:
@@ -307,6 +307,10 @@ def main():
|
||||
if not force:
|
||||
module.fail_json(dest=path, src=src, msg='Cannot link, file exists at destination')
|
||||
changed = True
|
||||
elif prev_state == 'directory':
|
||||
if not force:
|
||||
module.fail_json(dest=path, src=src, msg='Cannot link, directory exists at destination')
|
||||
changed = True
|
||||
else:
|
||||
module.fail_json(dest=path, src=src, msg='unexpected position reached')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user