diff --git a/lib/molecule_podman/playbooks/create.yml b/lib/molecule_podman/playbooks/create.yml index 85b9e1f..b63d07a 100644 --- a/lib/molecule_podman/playbooks/create.yml +++ b/lib/molecule_podman/playbooks/create.yml @@ -83,7 +83,11 @@ - name: Create molecule instance(s) command: > - podman run + podman + {% if item.cgroup_manager is defined %}--cgroup-manager={{ item.cgroup_manager }}{% endif %} + {% if item.storage_opt is defined %}--storage-opt={{ item.storage_opt }}{% endif %} + {% if item.storage_driver is defined %}--storage-driver={{ item.storage_driver }}{% endif %} + run -d --name "{{ item.name }}" {% if item.pid_mode is defined %}--pid={{ item.pid_mode }}{% endif %} @@ -102,9 +106,6 @@ {% if item.network is defined %}--network={{ item.network }}{% endif %} {% if item.etc_hosts is defined %}{% for i,k in item.etc_hosts.items() %}--add-host {{ i }}:{{ k }} {% endfor %}{% endif %} {% if item.hostname is defined %}--hostname={{ item.hostname }}{% elif item.name is defined %}--hostname={{ item.name }}{% endif %} - {% if item.cgroup_manager is defined %}--cgroup-manager={{ item.cgroup_manager }}{% endif %} - {% if item.storage_opt is defined %}--storage-opt={{ item.storage_opt }}{% endif %} - {% if item.storage_driver is defined %}--storage-driver={{ item.storage_driver }}{% endif %} {% if item.systemd is defined %}--systemd={{ item.systemd }}{% endif %} {{ item.pre_build_image | default(false) | ternary('', 'molecule_local/') }}{{ item.image }} {{ (command_directives_dict | default({}))[item.name] | default('') }}