docker_container: fix env_file option (#452)

* Add better tests for env and env_file.

* Make sure that non-container options are also passed to preprocessing code.

* Add changelog fragment.

* Add env_file override test.
This commit is contained in:
Felix Fontein
2022-08-15 07:45:59 +02:00
committed by GitHub
parent f9741b7457
commit f7cf12555c
4 changed files with 73 additions and 1 deletions
@@ -258,7 +258,7 @@ class ContainerManager(DockerBaseClass):
for options in active_options:
values = {}
engine = options.get_engine(self.engine_driver.name)
for option in options.options:
for option in options.all_options:
if not option.not_an_ansible_option and self.module.params[option.name] is not None:
values[option.name] = self.module.params[option.name]
values = options.preprocess(self.module, values)