From 272516d9b6b81b070ed3fa95fe290a9773ff0599 Mon Sep 17 00:00:00 2001 From: Lucendio Date: Fri, 8 Apr 2022 10:32:37 +0200 Subject: [PATCH] Allow to additionally configure arbitrary command-line options (#107) Co-authored-by: Sorin Sbarnea --- src/molecule_podman/driver.py | 2 ++ src/molecule_podman/playbooks/create.yml | 1 + 2 files changed, 3 insertions(+) diff --git a/src/molecule_podman/driver.py b/src/molecule_podman/driver.py index 66c4876..056624f 100644 --- a/src/molecule_podman/driver.py +++ b/src/molecule_podman/driver.py @@ -104,6 +104,8 @@ class Podman(Driver): storage_opt: overlay.mount_program=/usr/bin/fuse-overlayfs storage_driver: overlay systemd: true|false|always + extra_opts: + - --memory=128m If specifying the `CMD`_ directive in your ``Dockerfile.j2`` or consuming a built image which declares a ``CMD`` directive, then you must set diff --git a/src/molecule_podman/playbooks/create.yml b/src/molecule_podman/playbooks/create.yml index bad9063..a309378 100644 --- a/src/molecule_podman/playbooks/create.yml +++ b/src/molecule_podman/playbooks/create.yml @@ -168,6 +168,7 @@ {% if item.etc_hosts is defined %}{% for i,k in item.etc_hosts.items() %}{% if i != item.name %}--add-host {{ i }}:{{ k }} {% endif %}{% endfor %}{% endif %} {% if item.hostname is defined %}--hostname={{ item.hostname }}{% elif item.name is defined %}--hostname={{ item.name }}{% endif %} {% if item.systemd is defined %}--systemd={{ item.systemd|string|lower }}{% endif %} + {{ item.extra_opts | default([]) | join(' ') }} {{ item.pre_build_image | default(false) | ternary('', 'molecule_local/') }}{{ item.image }} {{ (command_directives_dict | default({}))[item.name] | default('') }} register: server