docker modules: add missing option types (#52422)

* Add missing option types for docker modules.

* Reorder argument_spec.

* First part of option reordering/reformatting.

* Second part of option reordering/reformatting.

* Forgot two required: false.

* Normalize booleans.

* Added missing period.
This commit is contained in:
Felix Fontein 2019-02-18 21:40:52 +01:00 committed by ansibot
parent 0e9ff44df1
commit 8388c89a29
18 changed files with 647 additions and 561 deletions

View file

@ -31,6 +31,7 @@ options:
required: False
description:
- The registry URL.
type: str
default: "https://index.docker.io/v1/"
aliases:
- registry
@ -38,25 +39,29 @@ options:
username:
description:
- The username for the registry account
required: True
type: str
required: yes
password:
description:
- The plaintext password for the registry account
required: True
type: str
required: yes
email:
required: False
description:
- "The email address for the registry account."
type: str
reauthorize:
description:
- Refresh existing authentication found in the configuration file.
type: bool
default: 'no'
default: no
aliases:
- reauth
config_path:
description:
- Custom path to the Docker CLI configuration file.
type: path
default: ~/.docker/config.json
aliases:
- self.config_path
@ -68,8 +73,9 @@ options:
- To logout you only need the registry server, which defaults to DockerHub.
- Before 2.1 you could ONLY log in.
- docker does not support 'logout' with a custom config file.
choices: ['present', 'absent']
type: str
default: 'present'
choices: ['present', 'absent']
extends_documentation_fragment:
- docker
@ -287,9 +293,9 @@ class LoginManager(DockerBaseClass):
def main():
argument_spec = dict(
registry_url=dict(type='str', required=False, default=DEFAULT_DOCKER_REGISTRY, aliases=['registry', 'url']),
username=dict(type='str', required=False),
password=dict(type='str', required=False, no_log=True),
registry_url=dict(type='str', default=DEFAULT_DOCKER_REGISTRY, aliases=['registry', 'url']),
username=dict(type='str'),
password=dict(type='str', no_log=True),
email=dict(type='str'),
reauthorize=dict(type='bool', default=False, aliases=['reauth']),
state=dict(type='str', default='present', choices=['present', 'absent']),