From ed7c9a1fbb7c311806d812f9e2f236109658aab9 Mon Sep 17 00:00:00 2001 From: Mike Grozak Date: Fri, 13 Dec 2013 17:10:50 +0100 Subject: [PATCH] Added to the file module the functionality to force conversion hard link and symlink when the force attribute is set to 'yes' --- library/files/file | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/files/file b/library/files/file index 134b5284ef..5e308e1126 100644 --- a/library/files/file +++ b/library/files/file @@ -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':