You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/changelogs/fragments/40839-docker_container_init...

3 lines
69 B
YAML

[2.6] Fix docker container init check requirements (#42533) * docker_container: fix init check requirements (#40839) * docker_container: ensure 'init' is supported Check docker-py version too. Move API version check in docker_container module since 'init' module parameter isn't defined by other docker modules. docker-py supports 'init' since 2.2.0: https://github.com/docker/docker-py/blob/2.2.0/docs/change-log.md * docker_container: fix compat with docker-py<2.2 Exception was: TypeError: create_host_config() got an unexpected keyword argument 'init' fatal: [localhost]: FAILED! => { "changed": false, "module_stderr": "Traceback (most recent call last): File ansible_module_docker_container.py, line 2089, in <module> main() File ansible_module_docker_container.py, line 2084, in main cm = ContainerManager(client) File ansible_module_docker_container.py, line 1704, in __init__ self.present(state) File ansible_module_docker_container.py, line 1724, in present new_container = self.container_create(self.parameters.image, self.parameters.create_parameters) File ansible_module_docker_container.py, line 826, in create_parameters host_config=self._host_config(), File ansible_module_docker_container.py, line 932, in _host_config return self.client.create_host_config(**params) File lib/python3.6/site-packages/docker/api/container.py, line 157, in create_host_config return utils.create_host_config(*args, **kwargs) TypeError: create_host_config() got an unexpected keyword argument 'init'", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 1 } (cherry picked from commit 3301a0b53073c25157e54bb98273ba8ec72c2125) * add changelog fragment
6 years ago
bugfixes:
- fixes docker_container compatibilty with docker-py < 2.2