diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2026-08-04 12:00:39 +0300 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2026-08-04 12:00:39 +0300 |
| commit | d38fe54ab035f8e3248b8e20a58abd89861833bf (patch) | |
| tree | fcc78428a726799568a1ae2253a16590e883c816 /roles/jails/20_immich/tasks/main.yml | |
| parent | 017b29539749da3c62202879d757a45ffc71208c (diff) | |
Simplify jail configuration
Diffstat (limited to 'roles/jails/20_immich/tasks/main.yml')
| -rw-r--r-- | roles/jails/20_immich/tasks/main.yml | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/roles/jails/20_immich/tasks/main.yml b/roles/jails/20_immich/tasks/main.yml index 835cd50..39decd1 100644 --- a/roles/jails/20_immich/tasks/main.yml +++ b/roles/jails/20_immich/tasks/main.yml @@ -46,28 +46,29 @@ label: "{{ item.item.name }}" when: not item.stat.exists -# Create mount points in each rootfs -- name: Create base mount points in image rootfs +- name: Create volume mount points in image rootfs file: - path: "/image/{{ item[0].name }}/{{ item[1] }}" + path: "/image/{{ item[0].name }}{{ item[1].dst }}" state: directory owner: root group: wheel mode: "0755" - loop: "{{ oci_images | product(['proc', 'sys', 'dev', 'tmp', 'run']) | list }}" + loop: "{{ oci_images | product(nullfs | default([]) | normalize_nullfs) | list }}" loop_control: - label: "{{ item[0].name }}/{{ item[1] }}" + label: "{{ item[0].name }}:{{ item[1].dst }}" + when: "item[1].dst.startswith('/image/' + item[0].name)" -- name: Create nullfs mount points in image rootfs +# Create mount points in each rootfs +- name: Create base mount points in image rootfs file: - path: "/image/{{ item.0.name }}{{ item.1.dst }}" + path: "/image/{{ item[0].name }}/{{ item[1] }}" state: directory owner: root group: wheel mode: "0755" - loop: "{{ oci_images | subelements('mounts', skip_missing=True) }}" + loop: "{{ oci_images | product(['proc', 'sys', 'dev', 'tmp', 'run']) | list }}" loop_control: - label: "{{ item.0.name }}:{{ item.1.dst }}" + label: "{{ item[0].name }}/{{ item[1] }}" # Deploy resolv.conf into each rootfs - name: Deploy resolv.conf into image rootfs |
