mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-21 12:20:21 -07:00
Fix module_fail_json call when symlink src does not exist
This commit is contained in:
parent
bf25193ec1
commit
52afacf475
1 changed files with 1 additions and 1 deletions
|
@ -322,7 +322,7 @@ def main():
|
||||||
else:
|
else:
|
||||||
abs_src = os.path.join(os.path.dirname(dest), src)
|
abs_src = os.path.join(os.path.dirname(dest), src)
|
||||||
if not os.path.exists(abs_src):
|
if not os.path.exists(abs_src):
|
||||||
module_fail_json(dest=dest, 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':
|
||||||
os.symlink(src, path)
|
os.symlink(src, path)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue