Cleaning up

This commit is contained in:
quinm0
2026-02-23 16:39:06 -05:00
commit affbfcd116
43 changed files with 1224 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
---
- name: Install mergerfs if not present
apt:
name: mergerfs
state: present
update_cache: yes
- name: Update mergerfs systemd service with drive paths
template:
src: mergerfs.service.j2
dest: /etc/systemd/system/mergerfs.service
mode: "0644"
owner: root
group: root
- name: Ensure fstab is updated with drive configurations
lineinfile:
regexp: "^PARTUUID={{ item.partuuid }}"
path: /etc/fstab
line: "PARTUUID={{ item.partuuid }} {{ mount_point }}/{{ item.name }} {{ item.fs_type }} defaults,auto,nofail 0 2"
state: present
loop: "{{ drive_configs }}"
- name: Ensure mount points exist and have appropriate permissions
file:
path: "{{ mount_point }}/{{ item.name }}"
state: directory
mode: "0755"
owner: root
group: root
loop: "{{ drive_configs }}"
- name: Systemctl daemon-reload
command: systemctl daemon-reload
- name: Mount all filesystems
command: mount -a
ignore_errors: yes
- name: Start and enable mergerfs service
systemd:
name: mergerfs
state: started
enabled: yes