From f24e335d0f4a9ea0b3037aafb0bbc1ff5425dc54 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Tue, 5 Aug 2014 20:39:33 -0400 Subject: [PATCH] Move doc fragments back into file module. --- library/files/file | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/library/files/file b/library/files/file index eb5cb089f9c..6e663e52f05 100644 --- a/library/files/file +++ b/library/files/file @@ -42,6 +42,49 @@ notes: - See also M(copy), M(template), M(assemble) requirements: [ ] author: Michael DeHaan +options: + path: + description: + - 'path to the file being managed. Aliases: I(dest), I(name)' + required: true + default: [] + aliases: ['dest', 'name'] + state: + description: + - If C(directory), all immediate subdirectories will be created if they + do not exist, since 1.7 they will be created with the supplied permissions. + If C(file), the file will NOT be created if it does not exist, see the M(copy) + 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. + 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). + required: false + default: file + choices: [ file, link, directory, hard, touch, absent ] + src: + required: false + default: null + choices: [] + description: + - path of the file to link to (applies only to C(state=link)). Will accept absolute, + relative and nonexisting paths. Relative paths are not expanded. + recurse: + required: false + default: "no" + choices: [ "yes", "no" ] + version_added: "1.1" + description: + - recursively set the specified file attributes (applies only to state=directory) + force: + required: false + default: "no" + choices: [ "yes", "no" ] + description: + - 'force the creation of the symlinks in two cases: the source file does + not exist (but will appear later); the destination exists and is a file (so, we need to unlink the + "path" file and create symlink to the "src" file in place of it).' ''' EXAMPLES = '''