diff --git a/plugins/module_utils/podman/podman_container_lib.py b/plugins/module_utils/podman/podman_container_lib.py index d0acfcda..b910a9f6 100644 --- a/plugins/module_utils/podman/podman_container_lib.py +++ b/plugins/module_utils/podman/podman_container_lib.py @@ -53,7 +53,7 @@ dns_search=dict(type='str', aliases=['dns_search_domains']), entrypoint=dict(type='str'), env=dict(type='dict'), - env_file=dict(type='path'), + env_file=dict(type='list', elements='path', aliases=['env_files']), env_host=dict(type='bool'), etc_hosts=dict(type='dict', aliases=['add_hosts']), expose=dict(type='list', elements='str', aliases=[ @@ -369,7 +369,9 @@ def addparam_env(self, c): return c def addparam_env_file(self, c): - return c + ['--env-file', self.params['env_file']] + for env_file in self.params['env_file']: + c += ['--env-file', env_file] + return c def addparam_env_host(self, c): self.check_version('--env-host', minv='1.5.0') diff --git a/plugins/modules/podman_container.py b/plugins/modules/podman_container.py index 0fc62e64..bfa3ceae 100644 --- a/plugins/modules/podman_container.py +++ b/plugins/modules/podman_container.py @@ -270,7 +270,10 @@ running, not on the controller machine where Ansible is executing. If you need to copy the file from controller to remote machine, use the copy or slurp module. - type: path + type: list + elements: path + aliases: + - env_files env_host: description: - Use all current host environment variables in container.