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