Skip to content

Commit

Permalink
Make kill_signal accept strings. (#506)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein authored Nov 28, 2022
1 parent 70d68dd commit edf0d3e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/506-docker_container-kill_signal.yml
Original file line number Diff line number Diff line change
@@ -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)."
2 changes: 1 addition & 1 deletion plugins/module_utils/module_container/docker_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit edf0d3e

Please sign in to comment.