Compare commits

...

3 Commits

Author SHA1 Message Date
7007d8f123 feat: Add mount option 2024-03-04 13:36:57 +01:00
319439c3ac refactor: Don't need to create volume 2024-03-04 13:36:43 +01:00
383ffae171 fix: Use list not dict 2024-03-04 13:35:50 +01:00
3 changed files with 9 additions and 7 deletions

View File

@ -1,7 +1,7 @@
---
# defaults file for podman
podman_containers: {}
podman_containers: []
# Exemple:
# - image: docker.io/wallabag/wallabag:latest
# name: wallbag

View File

@ -21,12 +21,6 @@
mode: u=rwX,g=rwX,o=
become: true
- name: Créer le volume
containers.podman.podman_volume:
name: "{{ item.split(':')[0] }}"
when: container.get('volumes', []) | length > 0
loop: "{{ container.volumes }}"
- name: Déployer le conteneur
ansible.builtin.template:
src: podman-quadlet.container.j2

View File

@ -22,6 +22,14 @@ AutoUpdate=registry
Volume={{ volume }}
{% endfor %}
{% for mount in container.get('mounts', []) %}
{% if mount.get('options', []) | length > 0 %}
Mount=type={{ mount.type }},src={{ mount.source }},dst={{ mount.destination }},{{ mount.options | join(',') }}
{% else %}
Mount=type={{ mount.type }},src={{ mount.source }},dst={{ mount.destination }}
{% endif %}
{% endfor %}
{% for port in container.get('ports', []) %}
PublishPort={{ port }}
{% endfor %}