From a1aec061f5bf2114620e4fba3ade50ec9f2cec2f Mon Sep 17 00:00:00 2001 From: Sergey Date: Mon, 11 Oct 2021 23:38:58 +0300 Subject: [PATCH] Support empty stings in prefixes (#321) --- plugins/module_utils/podman/common.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/module_utils/podman/common.py b/plugins/module_utils/podman/common.py index 213047a..aa3dcfc 100644 --- a/plugins/module_utils/podman/common.py +++ b/plugins/module_utils/podman/common.py @@ -45,11 +45,11 @@ def generate_systemd(module, module_params, name): command.extend(['--no-header']) if sysconf.get('names', True): command.extend(['--name']) - if sysconf.get('container_prefix'): + if sysconf.get('container_prefix') is not None: command.extend(['--container-prefix=%s' % sysconf['container_prefix']]) - if sysconf.get('pod_prefix'): + if sysconf.get('pod_prefix') is not None: command.extend(['--pod-prefix=%s' % sysconf['pod_prefix']]) - if sysconf.get('separator'): + if sysconf.get('separator') is not None: command.extend(['--separator=%s' % sysconf['separator']]) if module.params['debug'] or module_params['debug']: module.log("PODMAN-CONTAINER-DEBUG: systemd command: %s" %