From 7138742bcc0a9dffbe40e21b355ce3ee6ed7953b Mon Sep 17 00:00:00 2001 From: Christopher Torgalson Date: Wed, 30 Aug 2017 16:00:30 +0200 Subject: [PATCH] Clarifies File module docs re: absent state (#28748) - The passage beginning "Note that file will not fail..." was slightly unclear about the fact that it referred to the behavior of the module when `state` is set to `absent`. - Fixes #23203 --- lib/ansible/modules/files/file.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/files/file.py b/lib/ansible/modules/files/file.py index 68eddcec661a02..9157f98b55b576 100644 --- a/lib/ansible/modules/files/file.py +++ b/lib/ansible/modules/files/file.py @@ -46,7 +46,8 @@ 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 C(file) will not fail if the C(path) does not exist as the state did not change. + Note that C(absent) will not cause C(file) to 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).