]> xn--ix-yja.es Git - alex.git/commitdiff
Add support for extra disks
authoralex <alex@pdp7.net>
Sun, 11 Jun 2023 14:57:42 +0000 (16:57 +0200)
committeralex <alex@pdp7.net>
Sun, 11 Jun 2023 14:57:42 +0000 (16:57 +0200)
personal_infra/playbooks/roles/proxmox_create_lxc/tasks/main.yml

index e1f4608cc0c268b2af86ce57d46371ec4e97520f..734d02728a33dcd29f13a0f5f1ff94c88dfb9d19 100644 (file)
@@ -14,6 +14,9 @@
       {% if not proxmox.privileged|default(false) %} -unprivileged {% endif %}
       {% if proxmox.features|default(None) %} -features {{ proxmox.features }} {% endif %}
       {% if proxmox.memory|default(None) %} -memory {{ proxmox.memory }} {% endif %}
+      {% for disk in proxmox.disks|default([]) %}
+        --mp{{ disk.index }} volume={{ disk.storage }}:{{ disk.size_gb }},mp={{ disk.path }}
+      {% endfor %}
       -rootfs local-zfs:{{ proxmox.disk|default(4) }}
       --password {{ ansible_password|trim }}
       --nameserver {{ hostvars[proxmox.host].network.self_internal_ip }}