community.docker/plugins
Shane St Savage a512e7fb9e
feat: allow unlimited memory_swap in docker_container (#138)
* feat: allow unlimited memory_swap in docker_container

summary: in docker_container, allow `memory_swap: values
`unlimited` and `-1` for unlimited container swap usage.

`--memory-swap=-1` is a valid docker run value allowing
unlimited swap usage. `docker_container` should allow
setting this value via `memory_swap` values `unlimited`
and `-1` as it sometimes must explicitly be set to prevent
docker from attempting to limit swap usage to double the
`--memory` value by default. In rootless docker environments,
attempting to set `memory-swap` usage limits will result in an error
if the user doesn't have the ability to do so. Allowing explicit
unlimited swap usage via docker_container will prevent these errors.

https://docs.docker.com/config/containers/resource_constraints/#--memory-swap-details

* Update tests/integration/targets/docker_container/tasks/tests/options.yml

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-05-10 20:24:04 +02:00
..
connection docker.py: allow docker versions beginning with 'v' (#76) 2021-01-27 14:16:35 +00:00
doc_fragments Deprecate default for tls_hostname (#134) 2021-05-04 07:50:33 +02:00
inventory Add use_ssh_client flag (#114) 2021-04-02 10:14:09 +02:00
module_utils Deprecate default for tls_hostname (#134) 2021-05-04 07:50:33 +02:00
modules feat: allow unlimited memory_swap in docker_container (#138) 2021-05-10 20:24:04 +02:00
plugin_utils Deprecate default for tls_hostname (#134) 2021-05-04 07:50:33 +02:00