Fix bug with container volumes
The variable probably couldn't be altered because it came in as a variable to the role.
This commit is contained in:
parent
cfb228cada
commit
a225fc39db
1 changed files with 3 additions and 3 deletions
|
|
@ -56,8 +56,8 @@
|
||||||
ansible.builtin.meta: flush_handlers
|
ansible.builtin.meta: flush_handlers
|
||||||
- name: Map volumes to Podman accepted list
|
- name: Map volumes to Podman accepted list
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
podman_container_volumes: "{{ podman_container_volumes + ['/home/' + container_user + '/' + item.name + ':' + item.mnt] }}"
|
container_volumes: "{{ container_volumes | default(podman_container_volumes) + ['/home/' + container_user + '/' + item.name + ':' + item.mnt] }}"
|
||||||
with_items: "{{ podman_simple_container_volumes }}"
|
loop: "{{ podman_simple_container_volumes }}"
|
||||||
- name: Start the container
|
- name: Start the container
|
||||||
containers.podman.podman_container:
|
containers.podman.podman_container:
|
||||||
name: "{{ podman_container_name }}"
|
name: "{{ podman_container_name }}"
|
||||||
|
|
@ -68,7 +68,7 @@
|
||||||
hostname: "{{ ansible_facts['hostname'] }}"
|
hostname: "{{ ansible_facts['hostname'] }}"
|
||||||
publish: "{{ podman_container_publish }}"
|
publish: "{{ podman_container_publish }}"
|
||||||
env: "{{ podman_container_env }}"
|
env: "{{ podman_container_env }}"
|
||||||
volumes: "{{ podman_container_volumes }}"
|
volumes: "{{ container_volumes }}"
|
||||||
state: stopped
|
state: stopped
|
||||||
# For more information on the systemd startup service, see: https://linuxhandbook.com/autostart-podman-containers/
|
# For more information on the systemd startup service, see: https://linuxhandbook.com/autostart-podman-containers/
|
||||||
generate_systemd:
|
generate_systemd:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue