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

Support --new in generate_systemd (#334)

* Support --new in generate_systemd

Fixes #318.

* Add docs
This commit is contained in:
Luca Beltrame 2021-11-18 13:35:42 +01:00 committed by GitHub
parent 8829be3231
commit cef7bdbea0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View file

@ -46,6 +46,8 @@ def generate_systemd(module, module_params, name):
command.extend(['--no-header'])
if sysconf.get('names', True):
command.extend(['--name'])
if sysconf.get("new"):
command.extend(["--new"])
if sysconf.get('container_prefix') is not None:
command.extend(['--container-prefix=%s' % sysconf['container_prefix']])
if sysconf.get('pod_prefix') is not None:

View file

@ -351,6 +351,13 @@ options:
container/pod and the prefix. The default is "-" (dash).
type: str
required: false
new:
description:
- Create containers and pods when the unit is started instead of
expecting them to exist. The default is "false".
Refer to podman-generate-systemd(1) for more information.
type: bool
default: false
gidmap:
description:
- Run the container in a new user namespace using the supplied mapping.