catch up with refactor

This commit is contained in:
2026-09-15 21:56:38 +05:30
parent a06e02c7cc
commit 92012be667
2 changed files with 12 additions and 12 deletions
+10 -10
View File
@@ -1,28 +1,28 @@
- ansible.builtin.include_role: - ansible.builtin.import_role:
role: ensureparentdir role: ensuredir
apply: become: true
vars: vars:
path: "{{ path }}" path: "{{ subvpath | dirname }}"
- name: check if btrfs subv exists - name: check if btrfs subv exists
register: btrfssubvexists register: btrfssubvexists
become: true become: true
failed_when: false failed_when: false
changed_when: false changed_when: false
ansible.builtin.shell: "btrfs subv list {{ path | mandatory | dirname }} | grep -qF {{ path | basename }}" ansible.builtin.shell: "btrfs subv list {{ subvpath | mandatory | dirname }} | grep -qF {{ subvpath | basename }}"
- block: - block:
- name: "create btrfs subv {{ path | mandatory }}" - name: "create btrfs subv {{ subvpath | mandatory }}"
when: btrfssubvexists.rc != 0 when: btrfssubvexists.rc != 0
become: true become: true
ansible.builtin.command: ansible.builtin.command:
cmd: "btrfs subv create {{ path }}" cmd: "btrfs subv create {{ subvpath }}"
- name: "set owner:group of subv {{ path }}" - name: "set owner:group of subv {{ subvpath }}"
when: btrfssubvexists.rc != 0 when: btrfssubvexists.rc != 0
become: true become: true
ansible.builtin.file: ansible.builtin.file:
state: touch state: touch
path: "{{ path | mandatory }}" path: "{{ subvpath | mandatory }}"
owner: "{{ owner | mandatory }}" owner: "{{ owner | mandatory }}"
group: "{{ group | default(owner) }}" group: "{{ group | default(owner) }}"
+2 -2
View File
@@ -14,5 +14,5 @@
role: createbtrfssubv role: createbtrfssubv
apply: apply:
vars: vars:
path: "/home/{{ item.name }}/.local/share/containers" subvpath: "/home/{{ item.name }}/.local/share/containers"
owner: "{{ item.name }}" owner: "{{ item.name }}"