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

@ -46,7 +46,6 @@ options:
- Configures the device platform network operating system. This value is
used to load a device specific netconf plugin. If this option is not
configured, then the default netconf plugin will be used.
default: null
vars:
- name: ansible_network_os
remote_user:
@ -88,14 +87,14 @@ options:
timeout seconds, an error is generated.
default: 120
host_key_auto_add:
type: boolean
type: bool
description:
- By default, Ansible will prompt the user before adding SSH keys to the
known hosts file. Enabling this option, unknown host keys will
automatically be added to the known hosts file.
- Be sure to fully understand the security implications of enabling this
option on production systems as it could create a security vulnerability.
default: False
default: 'no'
ini:
section: paramiko_connection
key: host_key_auto_add

View file

@ -41,7 +41,6 @@ options:
- Configures the device platform network operating system. This value is
used to load the correct terminal and cliconf plugins to communicate
with the remote device
default: null
vars:
- name: ansible_network_os
remote_user:

View file

@ -150,7 +150,6 @@ DOCUMENTATION = '''
- name: ansible_ssh_private_key_file
control_path:
default: null
description:
- This is the location to save ssh's ControlPath sockets, it uses ssh's variable substitution.
- Since 2.3, if null, ansible will generate a unique hash. Use `%(directory)s` to indicate where to use the control dir path setting.
@ -170,12 +169,12 @@ DOCUMENTATION = '''
- section: ssh_connection
key: control_path_dir
sftp_batch_mode:
default: True
default: 'yes'
description: 'TODO: write it'
env: [{name: ANSIBLE_SFTP_BATCH_MODE}]
ini:
- {key: sftp_batch_mode, section: ssh_connection}
type: boolean
type: bool
scp_if_ssh:
default: smart
description:
@ -187,12 +186,12 @@ DOCUMENTATION = '''
- {key: scp_if_ssh, section: ssh_connection}
use_tty:
version_added: '2.5'
default: True
default: 'yes'
description: add -tt to ssh commands to force tty allocation
env: [{name: ANSIBLE_SSH_USETTY}]
ini:
- {key: usetty, section: ssh_connection}
type: boolean
type: bool
yaml: {key: connection.usetty}
'''

View file

@ -22,8 +22,8 @@ DOCUMENTATION = '''
options:
show_all:
description: toggles showing all vms vs only those with a working IP
type: boolean
default: False
type: bool
default: 'no'
inventory_hostname:
description: |
What to register as the inventory hostname.
@ -46,16 +46,16 @@ DOCUMENTATION = '''
neutron and can be expensive for people with many hosts.
(Note, the default value of this is opposite from the default
old openstack.py inventory script's option expand_hostvars)
type: boolean
default: False
type: bool
default: 'no'
private:
description: |
Use the private interface of each server, if it has one, as
the host's IP in the inventory. This can be useful if you are
running ansible inside a server in the cloud and would rather
communicate to your servers over the private network.
type: boolean
default: False
type: bool
default: 'no'
only_clouds:
description: |
List of clouds from clouds.yaml to use, instead of using
@ -70,8 +70,8 @@ DOCUMENTATION = '''
it can from as many clouds as it can contact. (Note, the
default value of this is opposite from the old openstack.py
inventory script's option fail_on_errors)
type: boolean
default: False
type: bool
default: 'no'
clouds_yaml_path:
description: |
Override path to clouds.yaml file. If this value is given it
@ -80,7 +80,6 @@ DOCUMENTATION = '''
/etc/ansible/openstack.yml to the regular locations documented
at https://docs.openstack.org/os-client-config/latest/user/configuration.html#config-files
type: string
default: None
compose:
description: Create vars from jinja2 expressions.
type: dictionary

View file

@ -20,7 +20,6 @@ description:
options:
attribute:
description: The attribute for which to get the value(s).
default: null
choices:
- supported-platforms
- default-vpc

View file

@ -18,10 +18,8 @@ description:
options:
service:
description: 'The service to filter ranges by. Options: EC2, S3, CLOUDFRONT, CODEbUILD, ROUTE53, ROUTE53_HEALTHCHECKS'
default: null
region:
description: 'The AWS region to narrow the ranges to. Examples: us-east-1, eu-west-2, ap-southeast-1'
default: null
"""
EXAMPLES = """

View file

@ -38,16 +38,10 @@ options:
required: True
return_fields:
description: The list of field names to return for the specified object.
required: False
default: null
filter:
description: a dict object that is used to filter the return objects
required: False
default: null
extattrs:
description: a dict object that is used to filter on extattrs
required: false
default: null
"""
EXAMPLES = """

View file

@ -23,21 +23,20 @@ DOCUMENTATION = """
default: '~/.password-store'
directory:
description: directory of the password store
default: null
env:
- name: PASSWORD_STORE_DIR
create:
description: flag to create the password
type: boolean
default: False
type: bool
default: 'no'
overwrite:
description: flag to overwrite the password
type: boolean
default: False
type: bool
default: 'no'
returnall:
description: flag to return all the contents of the password store
type: boolean
default: False
type: bool
default: 'no'
subkey:
description: subkey to return
default: password