mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00: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:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user