From 4e56510fab92753885f3a2d22f52733229933b94 Mon Sep 17 00:00:00 2001 From: Andrew Pope Date: Fri, 11 Oct 2013 18:02:18 -0400 Subject: [PATCH] Fixed broken force=yes on files for directories --- files/file | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/file b/files/file index dd17b9ca02f..28a0ce50be3 100644 --- a/files/file +++ b/files/file @@ -226,7 +226,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' and state == 'link') and state != 'touch': + if not (force and (prev_state == 'file' 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':