1
0
Fork 0
mirror of https://github.com/containers/ansible-podman-collections.git synced 2026-02-04 07:11:49 +00:00

Update env_file to accept a list of files instead of a single file

Signed-off-by: antoine <antoine.blin@gandi.net>
This commit is contained in:
antoine 2024-01-12 11:40:44 +01:00
parent 1fe9642576
commit db7b0b6b2d
2 changed files with 6 additions and 3 deletions

View file

@ -53,7 +53,7 @@ ARGUMENTS_SPEC_CONTAINER = dict(
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 @@ class PodmanModuleParams:
return c
def addparam_env_file(self, c):
return c + ['--env-file', self.params['env_file']]
for env_file in self.params['env_files']:
c += ['--env-file', env_file]
return c
def addparam_env_host(self, c):
self.check_version('--env-host', minv='1.5.0')

View file

@ -270,7 +270,8 @@ options:
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
env_host:
description:
- Use all current host environment variables in container.