mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-28 20:09:08 -07:00
docker_*: always use client.fail() over module.fail_json(), allow to always return data on failure (#51999)
* Always use client.fail() instead of module.fail_json(). * Allow to pass on results on module failure. * Linting.
This commit is contained in:
parent
ad386290b4
commit
d7fd4d0550
12 changed files with 64 additions and 60 deletions
|
@ -202,7 +202,7 @@ def main():
|
|||
cache_min_version = '3.3.0'
|
||||
if client.module.params['builder_cache'] and client.docker_py_version < LooseVersion(cache_min_version):
|
||||
msg = "Error: docker version is %s. Minimum version required for builds option is %s. Use `pip install --upgrade docker` to upgrade."
|
||||
client.module.fail(msg=(msg % (docker_version, cache_min_version)))
|
||||
client.fail(msg % (docker_version, cache_min_version))
|
||||
|
||||
result = dict()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue