Merge "Inject log-driver for podman containers"
This commit is contained in:
commit
ed34e3a43f
@ -29,6 +29,13 @@
|
||||
selevel: s0
|
||||
tags:
|
||||
- host_config
|
||||
- name: Create /var/log/containers/stdouts directory
|
||||
file:
|
||||
path: /var/log/containers/stdouts
|
||||
state: directory
|
||||
selevel: s0
|
||||
tags:
|
||||
- host_config
|
||||
- name: Create /var/lib/tripleo-config directory
|
||||
file:
|
||||
path: /var/lib/tripleo-config
|
||||
|
@ -409,6 +409,7 @@ def mp_puppet_config(*args):
|
||||
'--env', 'NO_ARCHIVE=%s' % os.environ.get('NO_ARCHIVE', ''),
|
||||
'--env', 'STEP=%s' % os.environ.get('STEP', '6'),
|
||||
'--env', 'NET_HOST=%s' % os.environ.get('NET_HOST', 'false'),
|
||||
'--log-driver', 'json-file',
|
||||
'--volume', '/etc/localtime:/etc/localtime:ro',
|
||||
'--volume', '%s:/etc/config.pp:ro' % tmp_man.name,
|
||||
'--volume', '/etc/puppet/:/tmp/puppet-etc/:ro',
|
||||
@ -423,6 +424,11 @@ def mp_puppet_config(*args):
|
||||
if privileged:
|
||||
common_dcmd.push('--privileged')
|
||||
|
||||
if container_cli == 'podman':
|
||||
logging = ['--log-opt',
|
||||
'path=/var/log/containers/stdouts/%s.log' % uname]
|
||||
common_dcmd.extend(logging)
|
||||
|
||||
|
||||
dcmd = common_dcmd + cli_dcmd
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user