mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
added possibility to force symlinks to none-existent destination (which might appear later)
This commit is contained in:
@@ -273,7 +273,8 @@ def main():
|
|||||||
abs_src = src
|
abs_src = src
|
||||||
else:
|
else:
|
||||||
module.fail_json(msg="absolute paths are required")
|
module.fail_json(msg="absolute paths are required")
|
||||||
if not os.path.exists(abs_src):
|
|
||||||
|
if not os.path.exists(abs_src) and not force:
|
||||||
module.fail_json(path=path, src=src, msg='src file does not exist')
|
module.fail_json(path=path, src=src, msg='src file does not exist')
|
||||||
|
|
||||||
if prev_state == 'absent':
|
if prev_state == 'absent':
|
||||||
|
|||||||
Reference in New Issue
Block a user