ansible: Update path for downloaded ISO images
authorKienan Stewart <kstewart@efficios.com>
Thu, 27 Jul 2023 18:06:23 +0000 (14:06 -0400)
committerKienan Stewart <kstewart@efficios.com>
Mon, 31 Jul 2023 18:35:13 +0000 (14:35 -0400)
/var/lib/libvirt/images isn't world-readable by default. The ISOs are
meant to be readily accessible as they should be used read-only.

In the cases where VMs are run as unprivileged users (eg. with lxd),
/var/lib/libvirt/images/*.iso isn't readable. Rather than loosening
the mode on the images folder, the ISOs will be in a directory
that is world-readable by default.

Change-Id: I056c290e5b88f0baaa52eaf749d4f29b53dbb8af

automation/ansible/roles/libvirt/vars/main.yml
automation/ansible/roles/zfs/tasks/main.yml

index 3bbb2f64dc71971e2ead23b1e9bad6edd8962837..de6a8f8b201b5fc090afa37f41493119aac52476 100644 (file)
@@ -12,10 +12,10 @@ vm_defaults:
 isos:
   - url: https://releases.ubuntu.com/jammy/ubuntu-22.04.2-live-server-amd64.iso
     checksum: "sha256:5e38b55d57d94ff029719342357325ed3bda38fa80054f9330dc789cd2d43931"
-    dest: /var/lib/libvirt/images/ubuntu-22.04.2-live-server-amd64.iso
+    dest: /var/lib/iso/ubuntu-22.04.2-live-server-amd64.iso
   - url: https://cdimage.debian.org/cdimage/archive/12.0.0/i386/iso-cd/debian-12.0.0-i386-netinst.iso
     checksum: "sha256:4f5cf17c611693d494c0a6a591b2d1e5fcd222d95e81bc555b581b2b01488f14"
-    dest: /var/lib/libvirt/images/debian-12.0.0-i386-netinst.iso
+    dest: /var/lib/iso/debian-12.0.0-i386-netinst.iso
   - url: https://cdimage.debian.org/cdimage/archive/12.0.0/amd64/iso-cd/debian-12.0.0-amd64-netinst.iso
     checksum: "sha256:3b0e9718e3653435f20d8c2124de6d363a51a1fd7f911b9ca0c6db6b3d30d53e"
-    dest: /var/lib/libvirt/images/debian-12.0.0-amd64-netinst.iso
+    dest: /var/lib/iso/debian-12.0.0-amd64-netinst.iso
index 219a5e1901a655cf4f36071f8cbdb475e75c72a5..447224f49a9f52056efd127703cf34f85a90ea32 100644 (file)
@@ -23,3 +23,9 @@
   with_items:
     - libvirt
     - lxd
+- name: Create ISO dataset
+  community.general.zfs:
+    name: 'tank/iso'
+    state: present
+    extra_zfs_properties:
+      mountpoint: '/var/lib/iso'
This page took 0.024075 seconds and 4 git commands to generate.