fix(user-backup): skip POSIX ACLs on NFS-backed backup roots

setfacl returns "Operation not supported" on NFS exports, hard-failing the
backup user setup in the swarm-nfs topology. Extract the ACL tasks into
03b_acl.yml and include them only when storage.backend \!= 'nfs'; chown
backup:backup + 0700 already enforce the same posture on NFS.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
kevinveenbirkenbachandClaude Opus 4.8 committed 2026-06-29 22:01:51 +02:00
1 parent bb45fdc170
commit fb423359d2
2 files changed
+49 -41

No files matched your search

@@ -12,47 +12,9 @@
group: backup
mode: "0700"
- name: 🔐 Grant ACL rwx on backups root to backup user
ansible.posix.acl:
path: "{{ DIR_BACKUPS }}"
entity: backup
etype: user
permissions: rwx
state: present
- name: 🔧 Set default ACL (inherit) for backup user under backups root
ansible.posix.acl:
path: "{{ DIR_BACKUPS }}"
entity: backup
etype: user
permissions: rwx
default: true
state: present
- name: 🔐 Default ACL for backup user (inherit)
ansible.posix.acl:
path: "{{ DIR_BACKUPS }}"
etype: user
entity: backup
permissions: rwx
default: true
state: present
- name: 🔐 Default ACL for group -> none
ansible.posix.acl:
path: "{{ DIR_BACKUPS }}"
etype: group
permissions: "---"
default: true
state: present
- name: 🔐 Default ACL for other -> none
ansible.posix.acl:
path: "{{ DIR_BACKUPS }}"
etype: other
permissions: "---"
default: true
state: present
- name: 🔐 Apply POSIX ACLs for the backup user (non-NFS backends)
ansible.builtin.include_tasks: 03b_acl.yml
when: storage.backend != 'nfs'
- name: 📁 Fix ownership level 0..2 directories to backup:backup
ansible.builtin.shell: >
+46
View File
@@ -0,0 +1,46 @@
---
# POSIX ACLs granting the backup user rwx (group/other none) with inheritance.
# Included only for non-NFS backends: NFS-backed backup roots reject setfacl with
# "Operation not supported", and the chown backup:backup + 0700 in the caller
# already enforce the same backup-only posture there.
- name: 🔐 Grant ACL rwx on backups root to backup user
ansible.posix.acl:
path: "{{ DIR_BACKUPS }}"
entity: backup
etype: user
permissions: rwx
state: present
- name: 🔧 Set default ACL (inherit) for backup user under backups root
ansible.posix.acl:
path: "{{ DIR_BACKUPS }}"
entity: backup
etype: user
permissions: rwx
default: true
state: present
- name: 🔐 Default ACL for backup user (inherit)
ansible.posix.acl:
path: "{{ DIR_BACKUPS }}"
etype: user
entity: backup
permissions: rwx
default: true
state: present
- name: 🔐 Default ACL for group -> none
ansible.posix.acl:
path: "{{ DIR_BACKUPS }}"
etype: group
permissions: "---"
default: true
state: present
- name: 🔐 Default ACL for other -> none
ansible.posix.acl:
path: "{{ DIR_BACKUPS }}"
etype: other
permissions: "---"
default: true
state: present