From 6c44e264c9bd9383c4bc06f7e27ebdbfcd7a153c Mon Sep 17 00:00:00 2001 From: Mike Grozak Date: Thu, 30 May 2013 13:05:10 +0200 Subject: [PATCH] added possibility to force symlinks to none-existent destination (which might appear later) --- library/files/file | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/files/file b/library/files/file index 341afdc35c..ab0ab6ec1d 100644 --- a/library/files/file +++ b/library/files/file @@ -273,7 +273,8 @@ def main(): abs_src = src else: module.fail_json(msg="absolute paths are required") - if not os.path.exists(abs_src): + + 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':