]> xn--ix-yja.es Git - alex.git/commitdiff
Add ZFS allow permissions for backup of new disks
authoralex <alex@pdp7.net>
Sun, 18 Jun 2023 10:46:30 +0000 (12:46 +0200)
committeralex <alex@pdp7.net>
Sun, 18 Jun 2023 10:46:30 +0000 (12:46 +0200)
personal_infra/playbooks/roles/proxmox_create_lxc/tasks/main.yml

index 734d02728a33dcd29f13a0f5f1ff94c88dfb9d19..4a5d37b623abce0970599802582543df8345f07c 100644 (file)
   args:
     creates: "/etc/pve/lxc/{{ proxmox.id }}.conf"
   delegate_to: "{{ proxmox.host }}"
+- name: allow backups
+  shell: "zfs allow -u backups mount,send,hold,snapshot,destroy rpool/data/$(pct config {{ proxmox.id }} | grep mp{{ item.index }} | cut -d , -f 1 | cut -d : -f 3)"
+  delegate_to: "{{ proxmox.host }}"
+  loop: "{{ proxmox.disks|default([]) }}"
 - name: proxmox extra
   when: proxmox.extra|default(None)
   block: