Skip to content

Commit

Permalink
Clarifies File module docs re: absent state (ansible#28748)
Browse files Browse the repository at this point in the history
- 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 ansible#23203
  • Loading branch information
ctorgalson authored and mkrizek committed Aug 30, 2017
1 parent b8da5ee commit 7138742
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ansible/modules/files/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down

0 comments on commit 7138742

Please sign in to comment.