Commit 684921c1 by sspans

only require absolute paths for hardlinks

parent eab67372
......@@ -280,13 +280,14 @@ def main():
elif state in ['link','hard']:
if os.path.isabs(src):
abs_src = src
else:
module.fail_json(msg="absolute paths are required")
if state == 'hard':
if os.path.isabs(src):
abs_src = src
else:
module.fail_json(msg="absolute paths are required")
if not os.path.exists(abs_src) and not force:
module.fail_json(path=path, src=src, msg='src file does not exist')
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':
changed = True
......
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