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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
624 changed files with 1458 additions and 9114 deletions

View file

@ -34,28 +34,25 @@ options:
tasks_from:
description:
- File to load from a role's C(tasks/) directory.
required: False
default: main
vars_from:
description:
- File to load from a role's C(vars/) directory.
required: False
default: main
defaults_from:
description:
- File to load from a role's C(defaults/) directory.
required: False
default: main
allow_duplicates:
description:
- Overrides the role's metadata setting to allow using a role more than once with the same parameters.
required: False
default: True
type: bool
default: 'yes'
private:
description:
- If C(True) the variables from C(defaults/) and C(vars/) in a role will not be made available to the rest of the
- If C(yes) the variables from C(defaults/) and C(vars/) in a role will not be made available to the rest of the
play.
default: None
type: bool
notes:
- Handlers are made available to the whole play.
'''

View file

@ -33,28 +33,25 @@ options:
tasks_from:
description:
- File to load from a role's C(tasks/) directory.
required: False
default: main
vars_from:
description:
- File to load from a role's C(vars/) directory.
required: False
default: main
defaults_from:
description:
- File to load from a role's C(defaults/) directory.
required: False
default: main
allow_duplicates:
description:
- Overrides the role's metadata setting to allow using a role more than once with the same parameters.
required: False
default: True
type: bool
default: 'yes'
private:
description:
- If C(True) the variables from C(defaults/) and C(vars/) in a role will not be made available to the rest of the
- If C(yes) the variables from C(defaults/) and C(vars/) in a role will not be made available to the rest of the
play.
default: None
type: bool
notes:
- Handlers are made available to the whole play.
- Before Ansible 2.4, as with C(include), this task could be static or dynamic, If static, it implied that it won't

View file

@ -33,12 +33,10 @@ options:
description:
- The directory name from which the variables should be loaded.
- If the path is relative, it will look for the file in vars/ subdirectory of a role or relative to playbook.
default: null
name:
version_added: "2.2"
description:
- The name of a variable into which assign the included vars. If omitted (null) they will be made top level vars.
default: null
depth:
version_added: "2.2"
description:
@ -49,18 +47,15 @@ options:
version_added: "2.2"
description:
- Limit the files that are loaded within any directory to this regular expression.
default: null
ignore_files:
version_added: "2.2"
description:
- List of file names to ignore.
default: null
extensions:
version_added: "2.3"
description:
- List of file extensions to read when using C(dir).
default: [yaml, yml, json]
required: False
free-form:
description:
- This module allows you to specify the 'file' option directly without any other options.

View file

@ -28,25 +28,18 @@ options:
minutes:
description:
- A positive number of minutes to pause for.
required: false
default: null
seconds:
description:
- A positive number of seconds to pause for.
required: false
default: null
prompt:
description:
- Optional text to use for the prompt message.
required: false
default: null
echo:
description:
- Contols whether or not keyboard input is shown when typing.
- Has no effect if 'seconds' or 'minutes' is set.
required: false
type: bool
default: 'yes'
choices: ['yes', 'no']
version_added: 2.5
author: "Tim Bielawa (@tbielawa)"
notes:

View file

@ -1,7 +1,7 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2013 Dag Wieers <dag@wieers.com>
# Copyright: (c) 2013, Dag Wieers (@dagwieers) <dag@wieers.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
@ -15,7 +15,8 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = '''
---
author: "Dag Wieers (@dagwieers)"
author:
- Dag Wieers (@dagwieers)
module: set_fact
short_description: Set host facts from a task
description:
@ -32,13 +33,12 @@ options:
in the playbook scope. Or alternatively, accepts complex arguments
using the C(args:) statement.
required: true
default: null
cacheable:
description:
- This boolean indicates if the facts set will also be added to the
fact cache, if fact caching is enabled.
required: false
default: false
type: bool
default: 'no'
version_added: "2.4"
version_added: "1.2"
notes:

View file

@ -83,8 +83,6 @@ options:
- Number of seconds to sleep between checks, before 2.3 this was hardcoded to 1 second.
msg:
version_added: "2.4"
required: false
default: null
description:
- This overrides the normal error message from a failure to meet the required conditions.
notes: