Clean up deprecations (#504)

* Adjust deprecation versions.

* Remove redirects that are already made in ansible/ansible's ansible_builtin_runtime.yml

* Remove modules that were moved to the google.cloud collection according to ansible/ansible's ansible_builtin_runtime.yml.

* The _info module is in google.cloud.

* The gcp doc_fragment is a copy of the one in google.cloud and is only used by one lookup. Mark as deprecated/internal.

* Remove entries of modules that no longer exist.

* Update ignore.txt.

* Try to fix test.

* Remove debug output.
This commit is contained in:
Felix Fontein 2020-06-16 13:15:19 +02:00 committed by GitHub
parent 5324b98e8f
commit b54ddaa28c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
152 changed files with 647 additions and 2628 deletions

View file

@ -308,7 +308,7 @@ services:
- A dictionary mapping the service's name to a dictionary of containers.
- Note that facts are part of the registered vars since Ansible 2.8. For compatibility reasons, the facts
are also accessible directly. The service's name is the variable with which the container dictionary
can be accessed. Note that the returned facts will be removed in Ansible 2.12.
can be accessed. Note that the returned facts will be removed in community.general 2.0.0.
returned: success
type: complex
contains:
@ -1136,7 +1136,8 @@ def main():
min_docker_api_version='1.20',
)
if client.module._name in ('docker_service', 'community.general.docker_service'):
client.module.deprecate("The 'docker_service' module has been renamed to 'docker_compose'.", version='2.12')
client.module.deprecate("The 'docker_service' module has been renamed to 'docker_compose'.",
version='2.0.0', collection_name='community.general') # was Ansible 2.12
try:
result = ContainerManager(client).exec_module()

View file

@ -29,7 +29,7 @@ notes:
these options, it will be recreated instead. The options with default values which can cause this are I(auto_remove),
I(detach), I(init), I(interactive), I(memory), I(paused), I(privileged), I(read_only) and I(tty). This behavior
can be changed by setting I(container_default_behavior) to C(no_defaults), which will be the default value from
Ansible 2.14 on.
community.general 3.0.0 on.
options:
auto_remove:
@ -89,7 +89,7 @@ options:
containers which use different values for these options.
- The default value is C(compatibility), which will ensure that the default values
are used when the values are not explicitly specified by the user.
- From Ansible 2.14 on, the default value will switch to C(no_defaults). To avoid
- From community.general 3.0.0 on, the default value will switch to C(no_defaults). To avoid
deprecation warnings, please set I(container_default_behavior) to an explicit
value.
- This affects the I(auto_remove), I(detach), I(init), I(interactive), I(memory),
@ -508,7 +508,7 @@ options:
network_mode:
description:
- Connect the container to a network. Choices are C(bridge), C(host), C(none), C(container:<name|id>), C(<network_name>) or C(default).
- "*Note* that from Ansible 2.14 on, if I(networks_cli_compatible) is C(true) and I(networks) contains at least one network,
- "*Note* that from community.general 3.0.0 on, if I(networks_cli_compatible) is C(true) and I(networks) contains at least one network,
the default value for I(network_mode) will be the name of the first network in the I(networks) list. You can prevent this
by explicitly specifying a value for I(network_mode), like the default value C(default) which will be used by Docker if
I(network_mode) is not specified."
@ -525,7 +525,7 @@ options:
- Note that as opposed to C(docker run ...), M(docker_container) does not remove the default
network if I(networks) is specified. You need to explicitly use I(purge_networks) to enforce
the removal of the default network (and all other networks not explicitly mentioned in I(networks)).
Alternatively, use the I(networks_cli_compatible) option, which will be enabled by default from Ansible 2.12 on.
Alternatively, use the I(networks_cli_compatible) option, which will be enabled by default from community.general 2.0.0 on.
type: list
elements: dict
suboptions:
@ -567,11 +567,11 @@ options:
- "*Note* that docker CLI also sets I(network_mode) to the name of the first network
added if C(--network) is specified. For more compatibility with docker CLI, you
explicitly have to set I(network_mode) to the name of the first network you're
adding. This behavior will change for Ansible 2.14: then I(network_mode) will
adding. This behavior will change for community.general 3.0.0: then I(network_mode) will
automatically be set to the first network name in I(networks) if I(network_mode)
is not specified, I(networks) has at least one entry and I(networks_cli_compatible)
is C(true)."
- Current value is C(no). A new default of C(yes) will be set in Ansible 2.12.
- Current value is C(no). A new default of C(yes) will be set in community.general 2.0.0.
type: bool
oom_killer:
description:
@ -618,7 +618,7 @@ options:
container port, 9000 is a host port, and 0.0.0.0 is a host interface."
- Port ranges can be used for source and destination ports. If two ranges with
different lengths are specified, the shorter range will be used.
Since Ansible 2.10, if the source port range has length 1, the port will not be assigned
Since community.general 0.2.0, if the source port range has length 1, the port will not be assigned
to the first port of the destination range, but to a free port in that range. This is the
same behavior as for C(docker) command line utility.
- "Bind addresses must be either IPv4 or IPv6 addresses. Hostnames are *not* allowed. This
@ -750,7 +750,7 @@ options:
trust_image_content:
description:
- If C(yes), skip image verification.
- The option has never been used by the module. It will be removed in Ansible 2.14.
- The option has never been used by the module. It will be removed in community.general 3.0.0.
type: bool
default: no
tmpfs:
@ -1054,7 +1054,8 @@ container:
description:
- Facts representing the current state of the container. Matches the docker inspection output.
- Note that facts are part of the registered vars since Ansible 2.8. For compatibility reasons, the facts
are also accessible directly as C(docker_container). Note that the returned fact will be removed in Ansible 2.12.
are also accessible directly as C(docker_container). Note that the returned fact will be removed in
community.general 2.0.0.
- Before 2.3 this was C(ansible_docker_container) but was renamed in 2.3 to C(docker_container) due to
conflicts with the connection plugin.
- Empty if I(state) is C(absent)
@ -3262,8 +3263,8 @@ class AnsibleDockerClientContainer(AnsibleDockerClient):
self.module.params['container_default_behavior'] = 'compatibility'
self.module.deprecate(
'The container_default_behavior option will change its default value from "compatibility" to '
'"no_defaults" in Ansible 2.14. To remove this warning, please specify an explicit value for it now',
version='2.14'
'"no_defaults" in community.general 3.0.0. To remove this warning, please specify an explicit value for it now',
version='3.0.0', collection_name='community.general' # was Ansible 2.14
)
if self.module.params['container_default_behavior'] == 'compatibility':
old_default_values = dict(
@ -3400,7 +3401,8 @@ def main():
stop_timeout=dict(type='int'),
sysctls=dict(type='dict'),
tmpfs=dict(type='list', elements='str'),
trust_image_content=dict(type='bool', default=False, removed_in_version='2.14'),
trust_image_content=dict(type='bool', default=False, removed_in_version='2.0.0',
removed_from_collection='community.general'), # was Ansible 2.12
tty=dict(type='bool'),
ulimits=dict(type='list', elements='str'),
user=dict(type='str'),
@ -3427,10 +3429,10 @@ def main():
'Please note that docker_container handles networks slightly different than docker CLI. '
'If you specify networks, the default network will still be attached as the first network. '
'(You can specify purge_networks to remove all networks not explicitly listed.) '
'This behavior will change in Ansible 2.12. You can change the behavior now by setting '
'This behavior will change in community.general 2.0.0. You can change the behavior now by setting '
'the new `networks_cli_compatible` option to `yes`, and remove this warning by setting '
'it to `no`',
version='2.12'
version='2.0.0', collection_name='community.general', # was Ansible 2.12
)
if client.module.params['networks_cli_compatible'] is True and client.module.params['networks'] and client.module.params['network_mode'] is None:
client.module.deprecate(
@ -3442,7 +3444,7 @@ def main():
'Please make sure that the value you set to `network_mode` equals the inspection result '
'for existing containers, otherwise the module will recreate them. You can find out the '
'correct value by running "docker inspect --format \'{{.HostConfig.NetworkMode}}\' <container_name>"',
version='2.14'
version='3.0.0', collection_name='community.general', # was Ansible 2.14
)
try:

View file

@ -18,7 +18,7 @@ description:
- Build, load or pull an image, making the image available for creating containers. Also supports tagging an
image into a repository and archiving an image to a .tar file.
- Since Ansible 2.8, it is recommended to explicitly specify the image's source (I(source) can be C(build),
C(load), C(pull) or C(local)). This will be required from Ansible 2.12 on.
C(load), C(pull) or C(local)). This will be required from community.general 2.0.0 on.
options:
source:
@ -31,9 +31,9 @@ options:
- "Use C(pull) to pull the image from a registry."
- "Use C(local) to make sure that the image is already available on the local
docker daemon, i.e. do not try to build, pull or load the image."
- "Before Ansible 2.12, the value of this option will be auto-detected
- "Before community.general 2.0.0, the value of this option will be auto-detected
to be backwards compatible, but a warning will be issued if it is not
explicitly specified. From Ansible 2.12 on, auto-detection will be disabled
explicitly specified. From community.general 2.0.0 on, auto-detection will be disabled
and this option will be made mandatory."
type: str
choices:
@ -70,7 +70,7 @@ options:
pull:
description:
- When building an image downloads any updates to the FROM image in Dockerfile.
- The default is currently C(yes). This will change to C(no) in Ansible 2.12.
- The default is currently C(yes). This will change to C(no) in community.general 2.0.0.
type: bool
rm:
description:
@ -137,15 +137,15 @@ options:
description:
- Use with state C(present) to load an image from a .tar file.
- Set I(source) to C(load) if you want to load the image. The option will
be set automatically before Ansible 2.12 if this option is used (except
be set automatically before community.general 2.0.0 if this option is used (except
if I(path) is specified as well, in which case building will take precedence).
From Ansible 2.12 on, you have to set I(source) to C(load).
From community.general 2.0.0 on, you have to set I(source) to C(load).
type: path
dockerfile:
description:
- Use with state C(present) and source C(build) to provide an alternate name for the Dockerfile to use when building an image.
- This can also include a relative path (relative to I(path)).
- Please use I(build.dockerfile) instead. This option will be removed in Ansible 2.12.
- Please use I(build.dockerfile) instead. This option will be removed in community.general 2.0.0.
type: str
force:
description:
@ -154,7 +154,7 @@ options:
to force tagging an image.
- Please stop using this option, and use the more specialized force options
I(force_source), I(force_absent) and I(force_tag) instead.
- This option will be removed in Ansible 2.12.
- This option will be removed in community.general 2.0.0.
type: bool
force_source:
description:
@ -176,7 +176,7 @@ options:
description:
- Timeout for HTTP requests during the image build operation. Provide a positive integer value for the number of
seconds.
- Please use I(build.http_timeout) instead. This option will be removed in Ansible 2.12.
- Please use I(build.http_timeout) instead. This option will be removed in community.general 2.0.0.
type: int
name:
description:
@ -190,17 +190,17 @@ options:
- Use with state 'present' to build an image. Will be the path to a directory containing the context and
Dockerfile for building an image.
- Set I(source) to C(build) if you want to build the image. The option will
be set automatically before Ansible 2.12 if this option is used. From Ansible 2.12
be set automatically before community.general 2.0.0 if this option is used. From community.general 2.0.0
on, you have to set I(source) to C(build).
- Please use I(build.path) instead. This option will be removed in Ansible 2.12.
- Please use I(build.path) instead. This option will be removed in community.general 2.0.0.
type: path
aliases:
- build_path
pull:
description:
- When building an image downloads any updates to the FROM image in Dockerfile.
- Please use I(build.pull) instead. This option will be removed in Ansible 2.12.
- The default is currently C(yes). This will change to C(no) in Ansible 2.12.
- Please use I(build.pull) instead. This option will be removed in community.general 2.0.0.
- The default is currently C(yes). This will change to C(no) in community.general 2.0.0.
type: bool
push:
description:
@ -210,13 +210,13 @@ options:
rm:
description:
- Remove intermediate containers after build.
- Please use I(build.rm) instead. This option will be removed in Ansible 2.12.
- Please use I(build.rm) instead. This option will be removed in community.general 2.0.0.
type: bool
default: yes
nocache:
description:
- Do not use cache when building an image.
- Please use I(build.nocache) instead. This option will be removed in Ansible 2.12.
- Please use I(build.nocache) instead. This option will be removed in community.general 2.0.0.
type: bool
default: no
repository:
@ -232,11 +232,11 @@ options:
- When C(present) check if an image exists using the provided name and tag. If the image is not found or the
force option is used, the image will either be pulled, built or loaded, depending on the I(source) option.
- By default the image will be pulled from Docker Hub, or the registry specified in the image's name. Note that
this will change in Ansible 2.12, so to make sure that you are pulling, set I(source) to C(pull). To build
this will change in community.general 2.0.0, so to make sure that you are pulling, set I(source) to C(pull). To build
the image, provide a I(path) value set to a directory containing a context and Dockerfile, and set I(source)
to C(build). To load an image, specify I(load_path) to provide a path to an archive file. To tag an image to
a repository, provide a I(repository) path. If the name contains a repository path, it will be pushed.
- "*Note:* C(state=build) is DEPRECATED and will be removed in Ansible 2.11. Specifying C(build) will behave the
- "*Note:* C(state=build) is DEPRECATED and will be removed in community.general 2.0.0. Specifying C(build) will behave the
same as C(present)."
type: str
default: present
@ -256,12 +256,12 @@ options:
- Provide a dictionary of C(key:value) build arguments that map to Dockerfile ARG directive.
- Docker expects the value to be a string. For convenience any non-string values will be converted to strings.
- Requires Docker API >= 1.21.
- Please use I(build.args) instead. This option will be removed in Ansible 2.12.
- Please use I(build.args) instead. This option will be removed in community.general 2.0.0.
type: dict
container_limits:
description:
- A dictionary of limits applied to each container created by the build process.
- Please use I(build.container_limits) instead. This option will be removed in Ansible 2.12.
- Please use I(build.container_limits) instead. This option will be removed in community.general 2.0.0.
type: dict
suboptions:
memory:
@ -287,7 +287,7 @@ options:
the server's certificate is valid for the server."
- "*Note:* If you specify this option, it will set the value of the I(tls) or
I(validate_certs) parameters if not set to C(no)."
- Will be removed in Ansible 2.11.
- Will be removed in community.general 2.0.0.
type: str
choices:
- 'no'
@ -806,30 +806,31 @@ def main():
memswap=dict(type='int'),
cpushares=dict(type='int'),
cpusetcpus=dict(type='str'),
), removed_in_version='2.12'),
dockerfile=dict(type='str', removed_in_version='2.12'),
force=dict(type='bool', removed_in_version='2.12'),
), removed_in_version='2.0.0', removed_from_collection='community.general'), # was Ansible 2.12
dockerfile=dict(type='str', removed_in_version='2.0.0', removed_from_collection='community.general'), # was Ansible 2.12
force=dict(type='bool', removed_in_version='2.0.0', removed_from_collection='community.general'), # was Ansible 2.12
force_source=dict(type='bool', default=False),
force_absent=dict(type='bool', default=False),
force_tag=dict(type='bool', default=False),
http_timeout=dict(type='int', removed_in_version='2.12'),
http_timeout=dict(type='int', removed_in_version='2.0.0', removed_from_collection='community.general'), # was Ansible 2.12
load_path=dict(type='path'),
name=dict(type='str', required=True),
nocache=dict(type='bool', default=False, removed_in_version='2.12'),
path=dict(type='path', aliases=['build_path'], removed_in_version='2.12'),
pull=dict(type='bool', removed_in_version='2.12'),
nocache=dict(type='bool', default=False, removed_in_version='2.0.0', removed_from_collection='community.general'), # was Ansible 2.12
path=dict(type='path', aliases=['build_path'], removed_in_version='2.0.0', removed_from_collection='community.general'), # was Ansible 2.12
pull=dict(type='bool', removed_in_version='2.0.0', removed_from_collection='community.general'), # was Ansible 2.12
push=dict(type='bool', default=False),
repository=dict(type='str'),
rm=dict(type='bool', default=True, removed_in_version='2.12'),
rm=dict(type='bool', default=True, removed_in_version='2.0.0', removed_from_collection='community.general'), # was Ansible 2.12
state=dict(type='str', default='present', choices=['absent', 'present', 'build']),
tag=dict(type='str', default='latest'),
use_tls=dict(type='str', choices=['no', 'encrypt', 'verify'], removed_in_version='2.11'),
buildargs=dict(type='dict', removed_in_version='2.12'),
use_tls=dict(type='str', choices=['no', 'encrypt', 'verify'], removed_in_version='2.0.0',
removed_from_collection='community.general'), # was Ansible 2.12
buildargs=dict(type='dict', removed_in_version='2.0.0', removed_from_collection='community.general'), # was Ansible 2.12
)
required_if = [
# ('state', 'present', ['source']), -- enable in Ansible 2.12.
# ('source', 'build', ['build']), -- enable in Ansible 2.12.
# ('state', 'present', ['source']), -- enable in community.general 2.0.0
# ('source', 'build', ['build']), -- enable in community.general 2.0.0
('source', 'load', ['load_path']),
]
@ -865,14 +866,14 @@ def main():
)
if client.module.params['state'] == 'build':
client.module.warn('The "build" state has been deprecated for a long time '
'and will be removed in Ansible 2.11. Please use '
'"present", which has the same meaning as "build".')
client.module.deprecate('The "build" state has been deprecated for a long time. '
'Please use "present", which has the same meaning as "build".',
version='2.0.0', collection_name='community.general') # was Ansible 2.11
client.module.params['state'] = 'present'
if client.module.params['use_tls']:
client.module.warn('The "use_tls" option has been deprecated for a long time '
'and will be removed in Ansible 2.11. Please use the'
'"tls" and "validate_certs" options instead.')
client.module.deprecate('The "use_tls" option has been deprecated for a long time. '
'Please use the "tls" and "validate_certs" options instead.',
version='2.0.0', collection_name='community.general') # was Ansible 2.11
if not is_valid_tag(client.module.params['tag'], allow_empty=True):
client.fail('"{0}" is not a valid docker tag!'.format(client.module.params['tag']))
@ -899,35 +900,39 @@ def main():
if client.module.params['build'].get(build_option, default_value) != default_value:
client.fail('Cannot specify both %s and build.%s!' % (option, build_option))
client.module.params['build'][build_option] = client.module.params[option]
client.module.warn('Please specify build.%s instead of %s. The %s option '
'has been renamed and will be removed in Ansible 2.12.' % (build_option, option, option))
client.module.deprecate('Please specify build.%s instead of %s. The %s option '
'has been renamed' % (build_option, option, option),
version='2.0.0', collection_name='community.general') # was Ansible 2.12
if client.module.params['source'] == 'build':
if (not client.module.params['build'] or not client.module.params['build'].get('path')):
client.fail('If "source" is set to "build", the "build.path" option must be specified.')
if client.module.params['build'].get('pull') is None:
client.module.warn("The default for build.pull is currently 'yes', but will be changed to 'no' in Ansible 2.12. "
"Please set build.pull explicitly to the value you need.")
client.module.params['build']['pull'] = True # TODO: change to False in Ansible 2.12
client.module.deprecate("The default for build.pull is currently 'yes', but will be changed to "
"'no' in community.general 2.0.0. Please set build.pull explicitly to the value you need",
version='2.0.0', collection_name='community.general') # was Ansible 2.12
client.module.params['build']['pull'] = True # TODO: change to False in community.general 2.0.0
if client.module.params['state'] == 'present' and client.module.params['source'] is None:
# Autodetection. To be removed in Ansible 2.12.
# Autodetection. To be removed in community.general 2.0.0.
if (client.module.params['build'] or dict()).get('path'):
client.module.params['source'] = 'build'
elif client.module.params['load_path']:
client.module.params['source'] = 'load'
else:
client.module.params['source'] = 'pull'
client.module.warn('The value of the "source" option was determined to be "%s". '
'Please set the "source" option explicitly. Autodetection will '
'be removed in Ansible 2.12.' % client.module.params['source'])
client.module.deprecate('The value of the "source" option was determined to be "%s". '
'Please set the "source" option explicitly. Autodetection will '
'be removed in community.general 2.0.0.' % client.module.params['source'],
version='2.0.0', collection_name='community.general') # was Ansible 2.12
if client.module.params['force']:
client.module.params['force_source'] = True
client.module.params['force_absent'] = True
client.module.params['force_tag'] = True
client.module.warn('The "force" option will be removed in Ansible 2.12. Please '
'use the "force_source", "force_absent" or "force_tag" option '
'instead, depending on what you want to force.')
client.module.deprecate('The "force" option will be removed in community.general 2.0.0. Please '
'use the "force_source", "force_absent" or "force_tag" option '
'instead, depending on what you want to force.',
version='2.0.0', collection_name='community.general') # was Ansible 2.12
try:
results = dict(

View file

@ -249,7 +249,8 @@ def main():
min_docker_api_version='1.20',
)
if client.module._name in ('docker_image_facts', 'community.general.docker_image_facts'):
client.module.deprecate("The 'docker_image_facts' module has been renamed to 'docker_image_info'", version='2.12')
client.module.deprecate("The 'docker_image_facts' module has been renamed to 'docker_image_info'",
version='2.0.0', collection_name='community.general') # was Ansible 2.12
try:
results = dict(

View file

@ -43,7 +43,7 @@ options:
email:
description:
- Does nothing, do not use.
- Will be removed in Ansible 2.14.
- Will be removed in community.general 3.0.0.
type: str
reauthorize:
description:
@ -445,7 +445,7 @@ def main():
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', removed_in_version='2.14'),
email=dict(type='str', removed_in_version='3.0.0', removed_from_collection='community.general'), # was Ansible 2.14
reauthorize=dict(type='bool', default=False, aliases=['reauth']),
state=dict(type='str', default='present', choices=['present', 'absent']),
config_path=dict(type='path', default='~/.docker/config.json', aliases=['dockercfg_path']),

View file

@ -82,7 +82,7 @@ options:
ipam_options:
description:
- Dictionary of IPAM options.
- Deprecated in 2.8, will be removed in 2.12. Use parameter I(ipam_config) instead. In Docker 1.10.0, IPAM
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter I(ipam_config) instead. In Docker 1.10.0, IPAM
options were introduced (see L(here,https://github.com/moby/moby/pull/17316)). This module parameter addresses
the IPAM config not the newly introduced IPAM options. For the IPAM options, see the I(ipam_driver_options)
parameter.
@ -271,7 +271,7 @@ network:
description:
- Network inspection results for the affected network.
- Note that facts are part of the registered vars since Ansible 2.8. For compatibility reasons, the facts
are also accessible directly as C(docker_network). Note that the returned fact will be removed in Ansible 2.12.
are also accessible directly as C(docker_network). Note that the returned fact will be removed in community.general 2.0.0.
returned: success
type: dict
sample: {}
@ -668,7 +668,7 @@ def main():
iprange=dict(type='str'),
gateway=dict(type='str'),
aux_addresses=dict(type='dict'),
), removed_in_version='2.12'),
), removed_in_version='2.0.0', removed_from_collection='community.general'), # was Ansible 2.12
ipam_config=dict(type='list', elements='dict', options=dict(
subnet=dict(type='str'),
iprange=dict(type='str'),

View file

@ -78,7 +78,7 @@ requirements:
- pyyaml
notes:
- Return values I(out) and I(err) have been deprecated and will be removed in Ansible 2.14. Use I(stdout) and I(stderr) instead.
- Return values I(out) and I(err) have been deprecated and will be removed in community.general 3.0.0. Use I(stdout) and I(stderr) instead.
'''
RETURN = '''

View file

@ -444,7 +444,7 @@ class SwarmManager(DockerBaseClass):
if self.state == 'inspect':
self.client.module.deprecate(
"The 'inspect' state is deprecated, please use 'docker_swarm_info' to inspect swarm cluster",
version='2.12')
version='2.0.0', collection_name='community.general') # was Ansible 2.12
choice_map.get(self.state)()

View file

@ -66,7 +66,7 @@ options:
description:
- List of the service constraints.
- Corresponds to the C(--constraint) option of C(docker service create).
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(placement.constraints) instead.
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(placement.constraints) instead.
type: list
elements: str
container_labels:
@ -219,7 +219,7 @@ options:
description:
- Service CPU limit. C(0) equals no limit.
- Corresponds to the C(--limit-cpu) option of C(docker service create).
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(limits.cpus) instead.
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(limits.cpus) instead.
type: float
limit_memory:
description:
@ -229,7 +229,7 @@ options:
- C(0) equals no limit.
- Omitting the unit defaults to bytes.
- Corresponds to the C(--limit-memory) option of C(docker service create).
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(limits.memory) instead.
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(limits.memory) instead.
type: str
logging:
description:
@ -250,13 +250,13 @@ options:
description:
- Configure the logging driver for a service.
- Corresponds to the C(--log-driver) option of C(docker service create).
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(logging.driver) instead.
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(logging.driver) instead.
type: str
log_driver_options:
description:
- Options for service logging driver.
- Corresponds to the C(--log-opt) option of C(docker service create).
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(logging.options) instead.
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(logging.options) instead.
type: dict
mode:
description:
@ -451,7 +451,7 @@ options:
description:
- Service CPU reservation. C(0) equals no reservation.
- Corresponds to the C(--reserve-cpu) option of C(docker service create).
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(reservations.cpus) instead.
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(reservations.cpus) instead.
type: float
reserve_memory:
description:
@ -461,7 +461,7 @@ options:
- C(0) equals no reservation.
- Omitting the unit defaults to bytes.
- Corresponds to the C(--reserve-memory) option of C(docker service create).
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(reservations.memory) instead.
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(reservations.memory) instead.
type: str
resolve_image:
description:
@ -506,7 +506,7 @@ options:
description:
- Restart condition of the service.
- Corresponds to the C(--restart-condition) option of C(docker service create).
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(restart_config.condition) instead.
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(restart_config.condition) instead.
type: str
choices:
- none
@ -516,7 +516,7 @@ options:
description:
- Maximum number of service restarts.
- Corresponds to the C(--restart-condition) option of C(docker service create).
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(restart_config.max_attempts) instead.
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(restart_config.max_attempts) instead.
type: int
restart_policy_delay:
description:
@ -524,7 +524,7 @@ options:
- "Accepts a duration as an integer in nanoseconds or as a string in a format that look like:
C(5h34m56s), C(1m30s) etc. The supported units are C(us), C(ms), C(s), C(m) and C(h)."
- Corresponds to the C(--restart-delay) option of C(docker service create).
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(restart_config.delay) instead.
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(restart_config.delay) instead.
type: raw
restart_policy_window:
description:
@ -532,7 +532,7 @@ options:
- "Accepts a duration as an integer in nanoseconds or as a string in a format that look like:
C(5h34m56s), C(1m30s) etc. The supported units are C(us), C(ms), C(s), C(m) and C(h)."
- Corresponds to the C(--restart-window) option of C(docker service create).
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(restart_config.window) instead.
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(restart_config.window) instead.
type: raw
rollback_config:
description:
@ -698,21 +698,21 @@ options:
C(5h34m56s), C(1m30s) etc. The supported units are C(us), C(ms), C(s), C(m) and C(h)."
- Corresponds to the C(--update-delay) option of C(docker service create).
- Before Ansible 2.8, the default value for this option was C(10).
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(update_config.delay) instead.
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(update_config.delay) instead.
type: raw
update_parallelism:
description:
- Rolling update parallelism.
- Corresponds to the C(--update-parallelism) option of C(docker service create).
- Before Ansible 2.8, the default value for this option was C(1).
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(update_config.parallelism) instead.
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(update_config.parallelism) instead.
type: int
update_failure_action:
description:
- Action to take in case of container failure.
- Corresponds to the C(--update-failure-action) option of C(docker service create).
- Usage of I(rollback) requires API version >= 1.29.
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(update_config.failure_action) instead.
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(update_config.failure_action) instead.
type: str
choices:
- continue
@ -725,21 +725,21 @@ options:
C(5h34m56s), C(1m30s) etc. The supported units are C(us), C(ms), C(s), C(m) and C(h)."
- Corresponds to the C(--update-monitor) option of C(docker service create).
- Requires API version >= 1.25.
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(update_config.monitor) instead.
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(update_config.monitor) instead.
type: raw
update_max_failure_ratio:
description:
- Fraction of tasks that may fail during an update before the failure action is invoked.
- Corresponds to the C(--update-max-failure-ratio) option of C(docker service create).
- Requires API version >= 1.25.
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(update_config.max_failure_ratio) instead.
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(update_config.max_failure_ratio) instead.
type: float
update_order:
description:
- Specifies the order of operations when rolling out an updated task.
- Corresponds to the C(--update-order) option of C(docker service create).
- Requires API version >= 1.29.
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(update_config.order) instead.
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(update_config.order) instead.
type: str
choices:
- stop-first
@ -2748,8 +2748,10 @@ def main():
driver=dict(type='str'),
options=dict(type='dict'),
)),
log_driver=dict(type='str', removed_in_version='2.12'),
log_driver_options=dict(type='dict', removed_in_version='2.12'),
log_driver=dict(type='str', removed_in_version='2.0.0',
removed_from_collection='community.general'), # was Ansible 2.12
log_driver_options=dict(type='dict', removed_in_version='2.0.0',
removed_from_collection='community.general'), # was Ansible 2.12
publish=dict(type='list', elements='dict', options=dict(
published_port=dict(type='int', required=True),
target_port=dict(type='int', required=True),
@ -2760,7 +2762,8 @@ def main():
constraints=dict(type='list', elements='str'),
preferences=dict(type='list', elements='dict'),
)),
constraints=dict(type='list', elements='str', removed_in_version='2.12'),
constraints=dict(type='list', elements='str', removed_in_version='2.0.0',
removed_from_collection='community.general'), # was Ansible 2.12
tty=dict(type='bool'),
dns=dict(type='list', elements='str'),
dns_search=dict(type='list', elements='str'),
@ -2789,15 +2792,19 @@ def main():
cpus=dict(type='float'),
memory=dict(type='str'),
)),
limit_cpu=dict(type='float', removed_in_version='2.12'),
limit_memory=dict(type='str', removed_in_version='2.12'),
limit_cpu=dict(type='float', removed_in_version='2.0.0',
removed_from_collection='community.general'), # was Ansible 2.12
limit_memory=dict(type='str', removed_in_version='2.0.0',
removed_from_collection='community.general'), # was Ansible 2.12
read_only=dict(type='bool'),
reservations=dict(type='dict', options=dict(
cpus=dict(type='float'),
memory=dict(type='str'),
)),
reserve_cpu=dict(type='float', removed_in_version='2.12'),
reserve_memory=dict(type='str', removed_in_version='2.12'),
reserve_cpu=dict(type='float', removed_in_version='2.0.0',
removed_from_collection='community.general'), # was Ansible 2.12
reserve_memory=dict(type='str', removed_in_version='2.0.0',
removed_from_collection='community.general'), # was Ansible 2.12
resolve_image=dict(type='bool', default=False),
restart_config=dict(type='dict', options=dict(
condition=dict(type='str', choices=['none', 'on-failure', 'any']),
@ -2808,11 +2815,15 @@ def main():
restart_policy=dict(
type='str',
choices=['none', 'on-failure', 'any'],
removed_in_version='2.12'
removed_in_version='2.0.0',
removed_from_collection='community.general', # was Ansible 2.12
),
restart_policy_delay=dict(type='raw', removed_in_version='2.12'),
restart_policy_attempts=dict(type='int', removed_in_version='2.12'),
restart_policy_window=dict(type='raw', removed_in_version='2.12'),
restart_policy_delay=dict(type='raw', removed_in_version='2.0.0',
removed_from_collection='community.general'), # was Ansible 2.12
restart_policy_attempts=dict(type='int', removed_in_version='2.0.0',
removed_from_collection='community.general'), # was Ansible 2.12
restart_policy_window=dict(type='raw', removed_in_version='2.0.0',
removed_from_collection='community.general'), # was Ansible 2.12
rollback_config=dict(type='dict', options=dict(
parallelism=dict(type='int'),
delay=dict(type='str'),
@ -2835,19 +2846,25 @@ def main():
max_failure_ratio=dict(type='float'),
order=dict(type='str'),
)),
update_delay=dict(type='raw', removed_in_version='2.12'),
update_parallelism=dict(type='int', removed_in_version='2.12'),
update_delay=dict(type='raw', removed_in_version='2.0.0',
removed_from_collection='community.general'), # was Ansible 2.12
update_parallelism=dict(type='int', removed_in_version='2.0.0',
removed_from_collection='community.general'), # was Ansible 2.12
update_failure_action=dict(
type='str',
choices=['continue', 'pause', 'rollback'],
removed_in_version='2.12'
removed_in_version='2.0.0',
removed_from_collection='community.general', # was Ansible 2.12
),
update_monitor=dict(type='raw', removed_in_version='2.12'),
update_max_failure_ratio=dict(type='float', removed_in_version='2.12'),
update_monitor=dict(type='raw', removed_in_version='2.0.0',
removed_from_collection='community.general'), # was Ansible 2.12
update_max_failure_ratio=dict(type='float', removed_in_version='2.0.0',
removed_from_collection='community.general'), # was Ansible 2.12
update_order=dict(
type='str',
choices=['stop-first', 'start-first'],
removed_in_version='2.12'
removed_in_version='2.0.0',
removed_from_collection='community.general', # was Ansible 2.12
),
user=dict(type='str'),
working_dir=dict(type='str'),

View file

@ -45,7 +45,7 @@ options:
- With state C(present) causes the volume to be deleted and recreated if the volume already
exist and the driver, driver options or labels differ. This will cause any data in the existing
volume to be lost.
- Deprecated. Will be removed in Ansible 2.12. Set I(recreate) to C(options-changed) instead
- Deprecated. Will be removed in community.general 2.0.0. Set I(recreate) to C(options-changed) instead
for the same behavior of setting I(force) to C(yes).
type: bool
default: no
@ -113,7 +113,7 @@ volume:
description:
- Volume inspection results for the affected volume.
- Note that facts are part of the registered vars since Ansible 2.8. For compatibility reasons, the facts
are also accessible directly as C(docker_volume). Note that the returned fact will be removed in Ansible 2.12.
are also accessible directly as C(docker_volume). Note that the returned fact will be removed in community.general 2.0.0.
returned: success
type: dict
sample: {}
@ -302,7 +302,7 @@ def main():
driver=dict(type='str', default='local'),
driver_options=dict(type='dict', default={}),
labels=dict(type='dict'),
force=dict(type='bool', removed_in_version='2.12'),
force=dict(type='bool', removed_in_version='2.0.0', removed_from_collection='community.general'), # was Ansible 2.12
recreate=dict(type='str', default='never', choices=['always', 'never', 'options-changed']),
debug=dict(type='bool', default=False)
)