From f979928ecc81b0ba87927389ec3a69d7b15399ab Mon Sep 17 00:00:00 2001 From: David Chwalisz Date: Mon, 1 Aug 2016 08:23:04 -0500 Subject: [PATCH] file module: add clarification on state=absent re files that do not exist. --- lib/ansible/modules/files/file.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ansible/modules/files/file.py b/lib/ansible/modules/files/file.py index fda8fe7f8e3..f23c1d51e9e 100644 --- a/lib/ansible/modules/files/file.py +++ b/lib/ansible/modules/files/file.py @@ -55,6 +55,7 @@ options: or M(template) module if you want that behavior. If C(link), the symbolic link will be created or changed. Use C(hard) for hardlinks. If C(absent), directories will be recursively deleted, and files or symlinks will be unlinked. + Note that M(file) will not fail if the C(path) does not exist as the state did not change. If C(touch) (new in 1.4), an empty file will be created if the C(path) does not exist, while an existing file or directory will receive updated file access and modification times (similar to the way `touch` works from the command line).