1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

added possibility to force symlinks to none-existent destination (which might appear later)

This commit is contained in:
Mike Grozak 2013-05-30 13:05:10 +02:00
parent 57154b04bb
commit 6c44e264c9

View file

@ -273,7 +273,8 @@ def main():
abs_src = src
else:
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')
if prev_state == 'absent':