From d0d5bdb905dd72f2134ec670129410d2714b0ef9 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 21 Jun 2021 12:40:53 +0200 Subject: [PATCH] docker_container: improve documentation for env w.r.t. automatic type conversions (#158) * Improve documentation for docker_container's env w.r.t. automatic type conversions. * Update plugins/modules/docker_container.py Co-authored-by: Amin Vakil Co-authored-by: Amin Vakil --- plugins/modules/docker_container.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/modules/docker_container.py b/plugins/modules/docker_container.py index a7f00435..fe038015 100644 --- a/plugins/modules/docker_container.py +++ b/plugins/modules/docker_container.py @@ -285,6 +285,8 @@ options: description: - Dictionary of key,value pairs. - Values which might be parsed as numbers, booleans or other types by the YAML parser must be quoted (e.g. C("true")) in order to avoid data loss. + - Please note that if you are passing values in with Jinja2 templates, like C("{{ value }}"), you need to add C(| string) to prevent Ansible to + convert strings such as C("true") back to booleans. The correct way is to use C("{{ value | string }}"). type: dict env_file: description: