docker_* modules: fix various errors in argument specs (#65632)

* Fix various errors in docker module argument specs.

* Adjust PR #.

* Fix option name.

* Fix username/password requirements for docker_login.
pull/65642/head
Felix Fontein 5 years ago committed by GitHub
parent 9f87978eb3
commit e9cec0262d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,3 @@
bugfixes:
- "docker_image - fix validation of build options."
- "docker_login - fix error handling when ``username`` or ``password`` is not specified when ``state`` is ``present``."

@ -804,7 +804,7 @@ class ImageManager(DockerBaseClass):
def main():
argument_spec = dict(
source=dict(type='str', choices=['build', 'load', 'pull', 'local']),
build=dict(type='dict', suboptions=dict(
build=dict(type='dict', options=dict(
cache_from=dict(type='list', elements='str'),
container_limits=dict(type='dict', options=dict(
memory=dict(type='int'),

@ -37,9 +37,9 @@ options:
- An image name or a list of image names. Name format will be C(name[:tag]) or C(repository/name[:tag]),
where C(tag) is optional. If a tag is not provided, C(latest) will be used. Instead of image names, also
image IDs can be used.
- If no name is provided, a list of all images will be returned.
type: list
elements: str
required: yes
extends_documentation_fragment:
- docker

@ -29,7 +29,6 @@ description:
- Running in check mode will perform the authentication without updating the config file.
options:
registry_url:
required: False
description:
- The registry URL.
type: str
@ -39,16 +38,15 @@ options:
- url
username:
description:
- The username for the registry account
- The username for the registry account.
- Required when I(state) is C(present).
type: str
required: yes
password:
description:
- The plaintext password for the registry account
- The plaintext password for the registry account.
- Required when I(state) is C(present).
type: str
required: yes
email:
required: False
description:
- Does nothing, do not use.
- Will be removed in Ansible 2.14.

@ -218,7 +218,7 @@ def main():
'prune': dict(type='bool', default=False),
'with_registry_auth': dict(type='bool', default=False),
'resolve_image': dict(type='str', choices=['always', 'changed', 'never']),
'state': dict(tpye='str', default='present', choices=['present', 'absent']),
'state': dict(type='str', default='present', choices=['present', 'absent']),
'absent_retries': dict(type='int', default=0),
'absent_retries_interval': dict(type='int', default=1)
},

@ -76,7 +76,6 @@ options:
Note that removing requires Docker SDK for Python >= 2.4.0.
- Set to C(inspect) to display swarm informations.
type: str
required: yes
default: present
choices:
- present

@ -55,7 +55,6 @@ options:
description:
- Name of the file containing the config. Defaults to the I(config_name) if not specified.
type: str
required: yes
uid:
description:
- UID of the config file's owner.
@ -194,7 +193,6 @@ options:
- Service image path and tag.
- Corresponds to the C(IMAGE) parameter of C(docker service create).
type: str
required: yes
labels:
description:
- Dictionary of key value pairs.
@ -640,7 +638,6 @@ options:
- C(present) - Asserts the existence of a service matching the name and provided configuration parameters.
Unspecified configuration parameters will be set to docker defaults.
type: str
required: yes
default: present
choices:
- present

@ -282,7 +282,7 @@
name: "{{ iname }}"
build:
path: "{{ role_path }}/files"
dockefile: "EtcHostsDockerfile"
dockerfile: "EtcHostsDockerfile"
pull: no
etc_hosts:
some-custom-host: "127.0.0.1"

@ -787,10 +787,6 @@ lib/ansible/modules/cloud/dimensiondata/dimensiondata_vlan.py validate-modules:d
lib/ansible/modules/cloud/dimensiondata/dimensiondata_vlan.py validate-modules:doc-required-mismatch
lib/ansible/modules/cloud/dimensiondata/dimensiondata_vlan.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/cloud/docker/docker_container.py use-argspec-type-path # uses colon-separated paths, can't use type=path
lib/ansible/modules/cloud/docker/docker_image_info.py validate-modules:doc-required-mismatch
lib/ansible/modules/cloud/docker/docker_login.py validate-modules:doc-required-mismatch
lib/ansible/modules/cloud/docker/docker_swarm.py validate-modules:doc-required-mismatch
lib/ansible/modules/cloud/docker/docker_swarm_service.py validate-modules:doc-required-mismatch
lib/ansible/modules/cloud/google/_gcdns_record.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/cloud/google/_gcdns_zone.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/cloud/google/_gce.py pylint:blacklisted-name

Loading…
Cancel
Save