mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #5282 from rhaido/hard_link_fix
file module: Added to the file module the functionality to force conversion hard link...
This commit is contained in:
commit
9ed379b7f8
1 changed files with 1 additions and 1 deletions
|
@ -245,7 +245,7 @@ def main():
|
|||
module.exit_json(path=path, changed=True)
|
||||
|
||||
if prev_state != 'absent' and prev_state != state:
|
||||
if not (force and (prev_state == 'file' or prev_state == 'directory') and state == 'link') and state != 'touch':
|
||||
if not (force and (prev_state == 'file' or prev_state == 'hard' or prev_state == 'directory') and state == 'link') and state != 'touch':
|
||||
module.fail_json(path=path, msg='refusing to convert between %s and %s for %s' % (prev_state, state, src))
|
||||
|
||||
if prev_state == 'absent' and state == 'absent':
|
||||
|
|
Loading…
Reference in a new issue