From 4dec1fd7fe376aa4d3a710c9bae255f6fb4cf1d2 Mon Sep 17 00:00:00 2001 From: Sergey Malyuk Date: Tue, 23 Dec 2025 11:59:24 +0300 Subject: [PATCH 01/10] add role and molecule --- roles/xfs_project_quotas/README.md | 38 +++++++++++++ roles/xfs_project_quotas/defaults/main.yml | 2 + roles/xfs_project_quotas/handlers/main.yml | 2 + roles/xfs_project_quotas/meta/main.yml | 16 ++++++ .../molecule/default/converge.yml | 5 ++ .../molecule/default/molecule.yml | 27 +++++++++ .../molecule/default/verify.yml | 11 ++++ roles/xfs_project_quotas/tasks/main.yml | 57 +++++++++++++++++++ roles/xfs_project_quotas/vars/main.yml | 2 + 9 files changed, 160 insertions(+) create mode 100644 roles/xfs_project_quotas/README.md create mode 100644 roles/xfs_project_quotas/defaults/main.yml create mode 100644 roles/xfs_project_quotas/handlers/main.yml create mode 100644 roles/xfs_project_quotas/meta/main.yml create mode 100644 roles/xfs_project_quotas/molecule/default/converge.yml create mode 100644 roles/xfs_project_quotas/molecule/default/molecule.yml create mode 100644 roles/xfs_project_quotas/molecule/default/verify.yml create mode 100644 roles/xfs_project_quotas/tasks/main.yml create mode 100644 roles/xfs_project_quotas/vars/main.yml diff --git a/roles/xfs_project_quotas/README.md b/roles/xfs_project_quotas/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/roles/xfs_project_quotas/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/xfs_project_quotas/defaults/main.yml b/roles/xfs_project_quotas/defaults/main.yml new file mode 100644 index 0000000..52ca5d2 --- /dev/null +++ b/roles/xfs_project_quotas/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for xfs_project_quotas diff --git a/roles/xfs_project_quotas/handlers/main.yml b/roles/xfs_project_quotas/handlers/main.yml new file mode 100644 index 0000000..cf4176b --- /dev/null +++ b/roles/xfs_project_quotas/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for xfs_project_quotas diff --git a/roles/xfs_project_quotas/meta/main.yml b/roles/xfs_project_quotas/meta/main.yml new file mode 100644 index 0000000..616eb4e --- /dev/null +++ b/roles/xfs_project_quotas/meta/main.yml @@ -0,0 +1,16 @@ +galaxy_info: + role_name: xfs_project_quotas + namespace: genlab + author: Alexander Gorelyshev + company: Genlab, LLC + description: "" + license: GPL-2.0-or-later + min_ansible_version: "2.1" + + platforms: + - name: Ubuntu + versions: ["jammy", "noble"] + + galaxy_tags: [] + +dependencies: [] diff --git a/roles/xfs_project_quotas/molecule/default/converge.yml b/roles/xfs_project_quotas/molecule/default/converge.yml new file mode 100644 index 0000000..bfa60e1 --- /dev/null +++ b/roles/xfs_project_quotas/molecule/default/converge.yml @@ -0,0 +1,5 @@ +--- +- name: Converge + hosts: all + roles: + - role: "genlab.common.xfs_project_quotas" diff --git a/roles/xfs_project_quotas/molecule/default/molecule.yml b/roles/xfs_project_quotas/molecule/default/molecule.yml new file mode 100644 index 0000000..d82158e --- /dev/null +++ b/roles/xfs_project_quotas/molecule/default/molecule.yml @@ -0,0 +1,27 @@ +--- +dependency: + name: galaxy + +driver: + name: docker + +platforms: + - name: ubuntu + image: geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2404}-ansible:latest + pre_build_image: true + command: ${MOLECULE_DOCKER_COMMAND:-""} + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup:rw + cgroupns_mode: host + privileged: true + +provisioner: + name: ansible + +verifier: + name: ansible + +lint: | + set -e + yamllint . + ansible-lint . diff --git a/roles/xfs_project_quotas/molecule/default/verify.yml b/roles/xfs_project_quotas/molecule/default/verify.yml new file mode 100644 index 0000000..6287e65 --- /dev/null +++ b/roles/xfs_project_quotas/molecule/default/verify.yml @@ -0,0 +1,11 @@ +--- + +- name: Verify + hosts: all + gather_facts: false + any_errors_fatal: true + + tasks: + - name: Blank + ansible.builtin.command: echo + changed_when: false diff --git a/roles/xfs_project_quotas/tasks/main.yml b/roles/xfs_project_quotas/tasks/main.yml new file mode 100644 index 0000000..17abcda --- /dev/null +++ b/roles/xfs_project_quotas/tasks/main.yml @@ -0,0 +1,57 @@ +--- +- name: "Quotas | Ensure xfsprogs package is installed" + ansible.builtin.apt: + name: xfsprogs + state: present + update_cache: true + cache_valid_time: 3600 + +- name: "Quotas | Ensure all /etc/projects entries exist" + loop: "{{ projects }}" + ansible.builtin.lineinfile: + path: /etc/projects + state: present + backup: true + regexp: "^{{ item.id }}:" + line: "{{ item.id }}:{{ item.path }}" + +- name: "Quotas | Ensure all /etc/projects entries exist" + loop: "{{ projects }}" + ansible.builtin.lineinfile: + path: /etc/projid + state: present + backup: true + regexp: "^{{ item.name }}:" + line: "{{ item.name }}:{{ item.id }}" + +- name: "Quotas | Ensure all project paths exist" + loop: "{{ projects }}" + ansible.builtin.file: + path: "{{ item.path }}" + state: directory + owner: "{{ item.owner }}" + group: "{{ item.group }}" + mode: "{{ item.mode }}" + +- name: "Quotas | Initialize project quotas" + changed_when: false + loop: "{{ projects }}" + ansible.builtin.command: + cmd: >- + xfs_quota + -x + -c + 'project -s {{ item.name }}' + {{ storage_mountpoint }} + +- name: "Quotas | Apply quota limits" + loop: "{{ projects }}" + community.general.xfs_quota: + type: project + name: "{{ item.name }}" + mountpoint: "{{ storage_mountpoint }}" + bsoft: "{{ item.bsoft | default('100G', false) }}" + bhard: "{{ item.bhard | default('100G', false) }}" + isoft: "{{ item.isoft | default(0, false) }}" + ihard: "{{ item.ihard | default(0, false) }}" + state: present diff --git a/roles/xfs_project_quotas/vars/main.yml b/roles/xfs_project_quotas/vars/main.yml new file mode 100644 index 0000000..0c60f9c --- /dev/null +++ b/roles/xfs_project_quotas/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for xfs_project_quotas From 29b28edc82ccfc504f79c37757aa6752ad0b7c52 Mon Sep 17 00:00:00 2001 From: Sergey Malyuk Date: Tue, 23 Dec 2025 16:59:00 +0300 Subject: [PATCH 02/10] make converge be working --- .../default/configuration/example.yml | 16 +++++ .../molecule/default/configuration/home.yml | 6 ++ .../molecule/default/converge.yml | 69 ++++++++++++++++++- roles/xfs_project_quotas/tasks/main.yml | 11 +++ 4 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 roles/xfs_project_quotas/molecule/default/configuration/example.yml create mode 100644 roles/xfs_project_quotas/molecule/default/configuration/home.yml diff --git a/roles/xfs_project_quotas/molecule/default/configuration/example.yml b/roles/xfs_project_quotas/molecule/default/configuration/example.yml new file mode 100644 index 0000000..dbfaa1b --- /dev/null +++ b/roles/xfs_project_quotas/molecule/default/configuration/example.yml @@ -0,0 +1,16 @@ +- id: 100 + path: /mnt/test0 + name: test0 + bsoft: "100M" + bhard: "100M" + owner: root + group: root + mode: "0700" +- id: 101 + path: /mnt/test1 + name: test1 + bsoft: "100M" + bhard: "100M" + owner: root + group: root + mode: "0700" \ No newline at end of file diff --git a/roles/xfs_project_quotas/molecule/default/configuration/home.yml b/roles/xfs_project_quotas/molecule/default/configuration/home.yml new file mode 100644 index 0000000..d095430 --- /dev/null +++ b/roles/xfs_project_quotas/molecule/default/configuration/home.yml @@ -0,0 +1,6 @@ +- id: 1 + path: /home/test + name: home-test + owner: root + group: root + mode: "0700" \ No newline at end of file diff --git a/roles/xfs_project_quotas/molecule/default/converge.yml b/roles/xfs_project_quotas/molecule/default/converge.yml index bfa60e1..8f5224d 100644 --- a/roles/xfs_project_quotas/molecule/default/converge.yml +++ b/roles/xfs_project_quotas/molecule/default/converge.yml @@ -1,5 +1,72 @@ --- - name: Converge hosts: all + pre_tasks: + - name: Get /root/image.img stats + ansible.builtin.stat: + path: /root/image.img + register: img_stat + + - name: Create image file + when: not img_stat.stat.exists + ansible.builtin.command: dd if=/dev/zero of=/root/image.img bs=1M count=400 + register: dd_result + changed_when: dd_result.rc == 0 + + - name: Get linked loop devices + ansible.builtin.command: losetup -a + changed_when: false + register: loop_devs + + - name: Link image to loop device + when: "'/root/image.img' not in loop_devs.stdout" + ansible.builtin.command: losetup --find --show -P /root/image.img + register: loop_device + changed_when: "'/dev/loop' in loop_device.stdout" + + - name: Get all loop devices + ansible.builtin.command: losetup -a + register: losetup_out + changed_when: false + + - name: Find line with /root/image.img + ansible.builtin.set_fact: + matched_line: "{{ losetup_out.stdout_lines + | select('search', '/root/image.img') + | list + | first + | default('') }}" + + - name: Extract loop device name (/dev/loopN) + ansible.builtin.set_fact: + loop_dev: "{{ matched_line | regex_search('(/dev/loop[0-9]+)', '\\1') | default('') }}" + + - name: Debug result + ansible.builtin.debug: + msg: "/root/image.img is linked to {{ loop_dev[0] }}" + when: loop_dev != '' + + - name: "Quotas | Ensure xfsprogs package is installed" + ansible.builtin.apt: + name: xfsprogs + state: present + update_cache: true + cache_valid_time: 3600 + + - name: Make xfs filesystem + ansible.builtin.filesystem: + fstype: xfs + dev: "{{ loop_dev[0] }}" + + - name: Mount xfs virtual disk + ansible.posix.mount: + path: /mnt + src: /root/image.img + fstype: xfs + opts: defaults,prjquota + state: mounted + roles: - - role: "genlab.common.xfs_project_quotas" + - role: genlab.common.xfs_project_quotas + projects: "{{ lookup('file', 'configuration/example.yml') | from_yaml }}" + storage_mountpoint: "/mnt" diff --git a/roles/xfs_project_quotas/tasks/main.yml b/roles/xfs_project_quotas/tasks/main.yml index 17abcda..6fe35c7 100644 --- a/roles/xfs_project_quotas/tasks/main.yml +++ b/roles/xfs_project_quotas/tasks/main.yml @@ -6,6 +6,17 @@ update_cache: true cache_valid_time: 3600 +- name: Touch /etc/projects and /etc/projid + loop: + - /etc/projects + - /etc/projid + ansible.builtin.file: + path: "{{ item }}" + state: touch + owner: root + group: root + mode: "0644" + - name: "Quotas | Ensure all /etc/projects entries exist" loop: "{{ projects }}" ansible.builtin.lineinfile: From d72a570783d97d09fa8fe7d9a1ff3fdf81c06db3 Mon Sep 17 00:00:00 2001 From: Sergey Malyuk Date: Wed, 24 Dec 2025 11:28:36 +0300 Subject: [PATCH 03/10] fix unidempotent task --- roles/xfs_project_quotas/tasks/main.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/roles/xfs_project_quotas/tasks/main.yml b/roles/xfs_project_quotas/tasks/main.yml index 6fe35c7..21131e6 100644 --- a/roles/xfs_project_quotas/tasks/main.yml +++ b/roles/xfs_project_quotas/tasks/main.yml @@ -6,12 +6,19 @@ update_cache: true cache_valid_time: 3600 -- name: Touch /etc/projects and /etc/projid +- name: Check files loop: - /etc/projects - /etc/projid - ansible.builtin.file: + ansible.builtin.stat: path: "{{ item }}" + register: proj_files + +- name: Create missing files + loop: "{{ proj_files.results }}" + when: not item.stat.exists + ansible.builtin.file: + path: "{{ item.invocation.module_args.path }}" state: touch owner: root group: root From 502c2f6deda622853d4fcc28e227dcd37d4a9177 Mon Sep 17 00:00:00 2001 From: Sergey Malyuk Date: Wed, 24 Dec 2025 11:28:56 +0300 Subject: [PATCH 04/10] add verify --- roles/xfs_project_quotas/molecule/default/verify.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/roles/xfs_project_quotas/molecule/default/verify.yml b/roles/xfs_project_quotas/molecule/default/verify.yml index 6287e65..26368e5 100644 --- a/roles/xfs_project_quotas/molecule/default/verify.yml +++ b/roles/xfs_project_quotas/molecule/default/verify.yml @@ -6,6 +6,8 @@ any_errors_fatal: true tasks: - - name: Blank - ansible.builtin.command: echo + - name: Check XFS project quotas on /mnt + ansible.builtin.command: xfs_quota -x -c 'report -p' /mnt + register: quota_output changed_when: false + failed_when: "'Project quota on /mnt' not in quota_output.stdout" From 94ad2387208d2e811de3ead1ca27ff4532e740f4 Mon Sep 17 00:00:00 2001 From: Sergey Malyuk Date: Wed, 24 Dec 2025 11:31:31 +0300 Subject: [PATCH 05/10] remove unneeded file --- .../molecule/default/configuration/home.yml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 roles/xfs_project_quotas/molecule/default/configuration/home.yml diff --git a/roles/xfs_project_quotas/molecule/default/configuration/home.yml b/roles/xfs_project_quotas/molecule/default/configuration/home.yml deleted file mode 100644 index d095430..0000000 --- a/roles/xfs_project_quotas/molecule/default/configuration/home.yml +++ /dev/null @@ -1,6 +0,0 @@ -- id: 1 - path: /home/test - name: home-test - owner: root - group: root - mode: "0700" \ No newline at end of file From cd78304e18fe25acb107b36c7e916fb6b80d6765 Mon Sep 17 00:00:00 2001 From: Sergey Malyuk Date: Wed, 24 Dec 2025 11:47:56 +0300 Subject: [PATCH 06/10] fix ansible-lint errors --- .../default/configuration/example.yml | 2 +- .../molecule/default/converge.yml | 34 +++++++++---------- .../molecule/default/verify.yml | 4 +-- roles/xfs_project_quotas/tasks/main.yml | 4 +-- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/roles/xfs_project_quotas/molecule/default/configuration/example.yml b/roles/xfs_project_quotas/molecule/default/configuration/example.yml index dbfaa1b..cbade34 100644 --- a/roles/xfs_project_quotas/molecule/default/configuration/example.yml +++ b/roles/xfs_project_quotas/molecule/default/configuration/example.yml @@ -13,4 +13,4 @@ bhard: "100M" owner: root group: root - mode: "0700" \ No newline at end of file + mode: "0700" diff --git a/roles/xfs_project_quotas/molecule/default/converge.yml b/roles/xfs_project_quotas/molecule/default/converge.yml index 8f5224d..9e685ef 100644 --- a/roles/xfs_project_quotas/molecule/default/converge.yml +++ b/roles/xfs_project_quotas/molecule/default/converge.yml @@ -5,33 +5,33 @@ - name: Get /root/image.img stats ansible.builtin.stat: path: /root/image.img - register: img_stat + register: xfs_project_quotas_img_stat - name: Create image file - when: not img_stat.stat.exists + when: not xfs_project_quotas_img_stat.stat.exists ansible.builtin.command: dd if=/dev/zero of=/root/image.img bs=1M count=400 - register: dd_result - changed_when: dd_result.rc == 0 + register: xfs_project_quotas_dd_result + changed_when: xfs_project_quotas_dd_result.rc == 0 - name: Get linked loop devices ansible.builtin.command: losetup -a changed_when: false - register: loop_devs + register: xfs_project_quotas_loop_devs - name: Link image to loop device - when: "'/root/image.img' not in loop_devs.stdout" + when: "'/root/image.img' not in xfs_project_quotas_loop_devs.stdout" ansible.builtin.command: losetup --find --show -P /root/image.img - register: loop_device - changed_when: "'/dev/loop' in loop_device.stdout" + register: xfs_project_quotas_loop_device + changed_when: "'/dev/loop' in xfs_project_quotas_loop_device.stdout" - name: Get all loop devices ansible.builtin.command: losetup -a - register: losetup_out + register: xfs_project_quotas_losetup_out changed_when: false - name: Find line with /root/image.img ansible.builtin.set_fact: - matched_line: "{{ losetup_out.stdout_lines + xfs_project_quotas_matched_line: "{{ xfs_project_quotas_losetup_out.stdout_lines | select('search', '/root/image.img') | list | first @@ -39,13 +39,13 @@ - name: Extract loop device name (/dev/loopN) ansible.builtin.set_fact: - loop_dev: "{{ matched_line | regex_search('(/dev/loop[0-9]+)', '\\1') | default('') }}" + xfs_project_quotas_loop_dev: "{{ xfs_project_quotas_matched_line | regex_search('(/dev/loop[0-9]+)', '\\1') | default('') }}" - name: Debug result ansible.builtin.debug: - msg: "/root/image.img is linked to {{ loop_dev[0] }}" - when: loop_dev != '' - + msg: "/root/image.img is linked to {{ xfs_project_quotas_loop_dev[0] }}" + when: xfs_project_quotas_loop_dev != '' + - name: "Quotas | Ensure xfsprogs package is installed" ansible.builtin.apt: name: xfsprogs @@ -54,10 +54,10 @@ cache_valid_time: 3600 - name: Make xfs filesystem - ansible.builtin.filesystem: + community.general.filesystem: fstype: xfs - dev: "{{ loop_dev[0] }}" - + dev: "{{ xfs_project_quotas_loop_dev[0] }}" + - name: Mount xfs virtual disk ansible.posix.mount: path: /mnt diff --git a/roles/xfs_project_quotas/molecule/default/verify.yml b/roles/xfs_project_quotas/molecule/default/verify.yml index 26368e5..53b8fd6 100644 --- a/roles/xfs_project_quotas/molecule/default/verify.yml +++ b/roles/xfs_project_quotas/molecule/default/verify.yml @@ -8,6 +8,6 @@ tasks: - name: Check XFS project quotas on /mnt ansible.builtin.command: xfs_quota -x -c 'report -p' /mnt - register: quota_output + register: xfs_project_quotas_quota_output changed_when: false - failed_when: "'Project quota on /mnt' not in quota_output.stdout" + failed_when: "'Project quota on /mnt' not in xfs_project_quotas_quota_output.stdout" diff --git a/roles/xfs_project_quotas/tasks/main.yml b/roles/xfs_project_quotas/tasks/main.yml index 21131e6..cc0ce60 100644 --- a/roles/xfs_project_quotas/tasks/main.yml +++ b/roles/xfs_project_quotas/tasks/main.yml @@ -12,10 +12,10 @@ - /etc/projid ansible.builtin.stat: path: "{{ item }}" - register: proj_files + register: xfs_project_quotas_proj_files - name: Create missing files - loop: "{{ proj_files.results }}" + loop: "{{ xfs_project_quotas_proj_files.results }}" when: not item.stat.exists ansible.builtin.file: path: "{{ item.invocation.module_args.path }}" From 3fbba94beca3ab32abce76f12aaba82a7c97f466 Mon Sep 17 00:00:00 2001 From: Sergey Malyuk Date: Wed, 24 Dec 2025 11:48:36 +0300 Subject: [PATCH 07/10] remove dependency install from main tasks --- roles/xfs_project_quotas/tasks/main.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/roles/xfs_project_quotas/tasks/main.yml b/roles/xfs_project_quotas/tasks/main.yml index cc0ce60..d9cc35b 100644 --- a/roles/xfs_project_quotas/tasks/main.yml +++ b/roles/xfs_project_quotas/tasks/main.yml @@ -1,11 +1,4 @@ --- -- name: "Quotas | Ensure xfsprogs package is installed" - ansible.builtin.apt: - name: xfsprogs - state: present - update_cache: true - cache_valid_time: 3600 - - name: Check files loop: - /etc/projects From d33e3b41e5c1980e82501f51b609b21300e918ad Mon Sep 17 00:00:00 2001 From: Sergey Malyuk Date: Wed, 24 Dec 2025 11:57:35 +0300 Subject: [PATCH 08/10] update meta --- README.md | 1 + galaxy.yml | 2 +- roles/xfs_project_quotas/README.md | 21 +++++++++------------ 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 9bc99fc..e1fce21 100644 --- a/README.md +++ b/README.md @@ -37,3 +37,4 @@ - [users](roles/users/README.md) - [wg_hub](roles/wg_hub/README.md) - [wg_spoke](roles/wg_spoke/README.md) +- [xfs_project_quotas](roles/xfs_project_quotas/README.md) diff --git a/galaxy.yml b/galaxy.yml index 57f1177..2d76ce6 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,7 +1,7 @@ --- namespace: genlab name: common -version: 0.32.0 +version: 0.33.0 readme: README.md authors: - Alexander Gorelyshev (corvus-migratorius@proton.me) diff --git a/roles/xfs_project_quotas/README.md b/roles/xfs_project_quotas/README.md index 225dd44..339386b 100644 --- a/roles/xfs_project_quotas/README.md +++ b/roles/xfs_project_quotas/README.md @@ -1,31 +1,28 @@ -Role Name +xfs_project_quotas ========= -A brief description of the role goes here. +Sets up XFS quotas Requirements ------------ -Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. +- `xfsprogs` package Role Variables -------------- -A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. +- `projects` — quota directories list +- `storage_mountpoint` — XFS mountpoint -Dependencies + Example Playbook ---------------- -Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: - - - hosts: servers - roles: - - { role: username.rolename, x: 42 } +See [converge.yml](molecule/default/converge.yml) License ------- @@ -35,4 +32,4 @@ BSD Author Information ------------------ -An optional section for the role authors to include contact information, or a website (HTML is not allowed). +Alexander Gorelyshev (corvus-migratorius@proton.me) From 40e27e6d25e58e55d86ae83c84f1da236d0f953c Mon Sep 17 00:00:00 2001 From: Sergey Malyuk Date: Thu, 19 Feb 2026 16:52:43 +0300 Subject: [PATCH 09/10] move dependancy installation back to main tasks --- roles/xfs_project_quotas/molecule/default/converge.yml | 7 ------- roles/xfs_project_quotas/tasks/main.yml | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/roles/xfs_project_quotas/molecule/default/converge.yml b/roles/xfs_project_quotas/molecule/default/converge.yml index 9e685ef..7d70a9e 100644 --- a/roles/xfs_project_quotas/molecule/default/converge.yml +++ b/roles/xfs_project_quotas/molecule/default/converge.yml @@ -46,13 +46,6 @@ msg: "/root/image.img is linked to {{ xfs_project_quotas_loop_dev[0] }}" when: xfs_project_quotas_loop_dev != '' - - name: "Quotas | Ensure xfsprogs package is installed" - ansible.builtin.apt: - name: xfsprogs - state: present - update_cache: true - cache_valid_time: 3600 - - name: Make xfs filesystem community.general.filesystem: fstype: xfs diff --git a/roles/xfs_project_quotas/tasks/main.yml b/roles/xfs_project_quotas/tasks/main.yml index d9cc35b..b0e9c60 100644 --- a/roles/xfs_project_quotas/tasks/main.yml +++ b/roles/xfs_project_quotas/tasks/main.yml @@ -17,6 +17,13 @@ group: root mode: "0644" +- name: "Quotas | Ensure xfsprogs package is installed" + ansible.builtin.apt: + name: xfsprogs + state: present + update_cache: true + cache_valid_time: 3600 + - name: "Quotas | Ensure all /etc/projects entries exist" loop: "{{ projects }}" ansible.builtin.lineinfile: From 2d7df9739922efe48dc23bf512024a94453fee67 Mon Sep 17 00:00:00 2001 From: Sergey Malyuk Date: Thu, 19 Feb 2026 17:12:10 +0300 Subject: [PATCH 10/10] duplicate dependancy installation to converge.yml because it is needed --- roles/xfs_project_quotas/molecule/default/converge.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/roles/xfs_project_quotas/molecule/default/converge.yml b/roles/xfs_project_quotas/molecule/default/converge.yml index 7d70a9e..9e685ef 100644 --- a/roles/xfs_project_quotas/molecule/default/converge.yml +++ b/roles/xfs_project_quotas/molecule/default/converge.yml @@ -46,6 +46,13 @@ msg: "/root/image.img is linked to {{ xfs_project_quotas_loop_dev[0] }}" when: xfs_project_quotas_loop_dev != '' + - name: "Quotas | Ensure xfsprogs package is installed" + ansible.builtin.apt: + name: xfsprogs + state: present + update_cache: true + cache_valid_time: 3600 + - name: Make xfs filesystem community.general.filesystem: fstype: xfs