Clean up module documentation (#36909)

* Clean up module documentation

This PR includes:
- Removal of `default: None` (and variations)
- Removal of `required: false`
- Fixing booleans and `type: bool` where required

* Fix remaining (new) validation issues
This commit is contained in:
Dag Wieers
2018-03-15 22:15:24 +01:00
committed by GitHub
parent 58eb2e849d
commit cdd21e2170
624 changed files with 1458 additions and 9114 deletions

View File

@@ -27,8 +27,6 @@ options:
- The file on the remote system to fetch. This I(must) be a file, not a
directory. Recursive fetching may be supported in a later release.
required: true
default: null
aliases: []
dest:
description:
- A directory to save the file into. For example, if the I(dest)
@@ -36,7 +34,6 @@ options:
C(host.example.com), would be saved into
C(/backup/host.example.com/etc/profile)
required: true
default: null
fail_on_missing:
version_added: "1.1"
description:
@@ -44,16 +41,14 @@ options:
read for any reason. Prior to Ansible-2.5, setting this would only fail
if the source file was missing.
- The default was changed to "yes" in Ansible-2.5.
required: false
choices: [ "yes", "no" ]
default: "yes"
type: bool
default: 'yes'
validate_checksum:
version_added: "1.4"
description:
- Verify that the source and destination checksums match after the files are fetched.
required: false
choices: [ "yes", "no" ]
default: "yes"
type: bool
default: 'yes'
aliases: [ "validate_md5" ]
flat:
version_added: "1.2"
@@ -62,7 +57,6 @@ options:
hostname/path/to/file to the destination. If dest ends with '/', it
will use the basename of the source file, similar to the copy module.
Obviously this is only handy if the filenames are unique.
requirements: []
author:
- "Ansible Core Team"
- "Michael DeHaan"

View File

@@ -38,7 +38,6 @@ options:
least one of the patterns specified. Multiple patterns can be specified using a list.
aliases: ['pattern']
excludes:
default: null
description:
- One or more (shell or regex) patterns, which type is controlled by C(use_regex) option.
- Excludes is a patterns should not be returned in list. Multiple patterns can be specified
@@ -60,10 +59,10 @@ options:
choices: [ any, directory, file, link ]
default: file
recurse:
default: 'no'
choices: [ 'no', 'yes' ]
description:
- If target is a directory, recursively descend into the directory looking for files.
type: bool
default: 'no'
size:
description:
- Select files whose size is equal to or greater than the specified size.
@@ -77,28 +76,26 @@ options:
description:
- Choose the file property against which we compare age.
hidden:
default: 'no'
choices: [ 'no', 'yes' ]
description:
- Set this to true to include hidden files, otherwise they'll be ignored.
follow:
type: bool
default: 'no'
choices: [ 'no', 'yes' ]
follow:
description:
- Set this to true to follow symlinks in path for systems with python 2.6+.
get_checksum:
type: bool
default: 'no'
choices: [ 'no', 'yes' ]
get_checksum:
description:
- Set this to true to retrieve a file's sha1 checksum.
use_regex:
type: bool
default: 'no'
choices: [ 'no', 'yes' ]
use_regex:
description:
- If false the patterns are file globs (shell) if true they are python regexes.
type: bool
default: 'no'
depth:
required: false
default: null
description:
- Set the maximum number of levels to decend into. Setting recurse
to false will override this value, which is effectively depth 1.