Browse code

Move doc fragments back into file module.

Michael DeHaan authored on 2014/08/06 09:39:33
Showing 1 changed files
... ...
@@ -42,6 +42,49 @@ notes:
42 42
     - See also M(copy), M(template), M(assemble)
43 43
 requirements: [ ]
44 44
 author: Michael DeHaan
45
+options:
46
+  path:
47
+    description:
48
+      - 'path to the file being managed.  Aliases: I(dest), I(name)'
49
+    required: true
50
+    default: []
51
+    aliases: ['dest', 'name'] 
52
+  state:
53
+    description:
54
+      - If C(directory), all immediate subdirectories will be created if they
55
+        do not exist, since 1.7 they will be created with the supplied permissions.
56
+        If C(file), the file will NOT be created if it does not exist, see the M(copy)
57
+        or M(template) module if you want that behavior.  If C(link), the symbolic
58
+        link will be created or changed. Use C(hard) for hardlinks. If C(absent),
59
+        directories will be recursively deleted, and files or symlinks will be unlinked.
60
+        If C(touch) (new in 1.4), an empty file will be created if the c(path) does not
61
+        exist, while an existing file or directory will receive updated file access and
62
+        modification times (similar to the way `touch` works from the command line).
63
+    required: false
64
+    default: file
65
+    choices: [ file, link, directory, hard, touch, absent ]
66
+  src:
67
+    required: false
68
+    default: null
69
+    choices: []
70
+    description:
71
+      - path of the file to link to (applies only to C(state=link)). Will accept absolute,
72
+        relative and nonexisting paths. Relative paths are not expanded.
73
+  recurse:
74
+    required: false
75
+    default: "no"
76
+    choices: [ "yes", "no" ]
77
+    version_added: "1.1"
78
+    description:
79
+      - recursively set the specified file attributes (applies only to state=directory)
80
+  force:
81
+    required: false
82
+    default: "no"
83
+    choices: [ "yes", "no" ]
84
+    description:
85
+      - 'force the creation of the symlinks in two cases: the source file does 
86
+        not exist (but will appear later); the destination exists and is a file (so, we need to unlink the
87
+        "path" file and create symlink to the "src" file in place of it).'
45 88
 '''
46 89
 
47 90
 EXAMPLES = '''