ansible-lint fixes
This commit is contained in:
@@ -2,25 +2,25 @@
|
||||
- name: Setup BTRFS
|
||||
block:
|
||||
- name: Create btrfs filesystem in main volume
|
||||
filesystem:
|
||||
dev: '{{ install_drive }}{{ main_partition_suffix }}'
|
||||
community.general.filesystem:
|
||||
dev: "{{ install_drive }}{{ main_partition_suffix }}"
|
||||
fstype: btrfs
|
||||
force: true
|
||||
|
||||
- name: Prepare BTRFS Subvolume
|
||||
mount:
|
||||
ansible.posix.mount:
|
||||
path: /mnt
|
||||
src: '{{ install_drive }}{{ main_partition_suffix }}'
|
||||
src: "{{ install_drive }}{{ main_partition_suffix }}"
|
||||
fstype: btrfs
|
||||
opts: rw,relatime,compress=zstd:15,ssd,space_cache=v2,discard=async
|
||||
state: mounted
|
||||
|
||||
- name: Enable quotas on Btrfs filesystem
|
||||
command: btrfs quota enable /mnt
|
||||
ansible.builtin.command: btrfs quota enable /mnt
|
||||
|
||||
- name: Make root subvolumes
|
||||
when: cis == true or item.subvol not in ['var_log', 'var_log_audit']
|
||||
command: btrfs su cr /mnt/{{ '@' if item.subvol == 'root' else '@' + item.subvol }}
|
||||
ansible.builtin.command: btrfs su cr /mnt/{{ '@' if item.subvol == 'root' else '@' + item.subvol }}
|
||||
loop:
|
||||
- { subvol: root }
|
||||
- { subvol: home }
|
||||
@@ -30,13 +30,13 @@
|
||||
|
||||
- name: Set quotas for subvolumes
|
||||
when: cis == true or item.subvol not in ['var_log', 'var_log_audit']
|
||||
command: btrfs qgroup limit {{ item.quota }} /mnt/{{ '@' if item.subvol == 'root' else '@' + item.subvol }}
|
||||
ansible.builtin.command: btrfs qgroup limit {{ item.quota }} /mnt/{{ '@' if item.subvol == 'root' else '@' + item.subvol }}
|
||||
loop:
|
||||
- { subvol: home, quota: '2G' }
|
||||
- { subvol: home, quota: 2G }
|
||||
|
||||
- name: Unmount Partition
|
||||
mount:
|
||||
ansible.posix.mount:
|
||||
path: /mnt
|
||||
src: '{{ install_drive }}{{ main_partition_suffix }}'
|
||||
src: "{{ install_drive }}{{ main_partition_suffix }}"
|
||||
fstype: btrfs
|
||||
state: unmounted
|
||||
|
||||
Reference in New Issue
Block a user