diff --git a/changelogs/fragments/506-docker_container-kill_signal.yml b/changelogs/fragments/506-docker_container-kill_signal.yml new file mode 100644 index 000000000..22c30f8d9 --- /dev/null +++ b/changelogs/fragments/506-docker_container-kill_signal.yml @@ -0,0 +1,2 @@ +bugfixes: + - "docker_container - the ``kill_signal`` option erroneously did not accept strings anymore since 3.0.0 (https://github.com/ansible-collections/community.docker/issues/505, https://github.com/ansible-collections/community.docker/pull/506)." diff --git a/plugins/module_utils/module_container/docker_api.py b/plugins/module_utils/module_container/docker_api.py index a115292d6..490aecd1f 100644 --- a/plugins/module_utils/module_container/docker_api.py +++ b/plugins/module_utils/module_container/docker_api.py @@ -302,7 +302,7 @@ def restart_container(self, client, container_id, timeout=None): def kill_container(self, client, container_id, kill_signal=None): params = {} if kill_signal is not None: - params['signal'] = int(kill_signal) + params['signal'] = kill_signal client.post_call('/containers/{0}/kill', container_id, params=params) def stop_container(self, client, container_id, timeout=None):