feat: refactor JuiceFS service configuration to use template file
Some checks failed
Ansible Lint Check / check-ansible (push) Failing after 16s
Nix Format Check / check-format (push) Successful in 56s
Python Lint Check / check-python (push) Failing after 12s

This commit is contained in:
Menno van Leeuwen 2025-03-13 23:27:41 +01:00
parent 65d6c6c56a
commit 1bed32f76e
Signed by: vleeuwenmenno
SSH Key Fingerprint: SHA256:OJFmjANpakwD3F2Rsws4GLtbdz1TJ5tkQF0RZmF0TRE
2 changed files with 13 additions and 22 deletions

View File

@ -59,28 +59,7 @@
- name: Create JuiceFS systemd service file - name: Create JuiceFS systemd service file
ansible.builtin.template: ansible.builtin.template:
src: juicefs.service.j2 src: templates/juicefs.service.j2
dest: /etc/systemd/system/juicefs.service
owner: root
group: root
mode: '0644'
become: true
- name: Create systemd service file content
ansible.builtin.copy:
content: |
[Unit]
Description=JuiceFS
After=network.target
Before=docker.service
[Service]
Type=simple
ExecStart=/usr/local/bin/juicefs mount sqlite3:///mnt/juicefs-metadata.sqlite /mnt/object_storage --cache-dir=/var/jfsCache --buffer-size=8192 --prefetch=4 --cache-size=204800 --writeback --attr-cache=1 --entry-cache=1 --open-cache=1
Restart=on-failure
[Install]
WantedBy=multi-user.target
dest: /etc/systemd/system/juicefs.service dest: /etc/systemd/system/juicefs.service
owner: root owner: root
group: root group: root

View File

@ -0,0 +1,12 @@
[Unit]
Description=JuiceFS
After=network.target
Before=docker.service
[Service]
Type=simple
ExecStart=/usr/local/bin/juicefs mount sqlite3:///mnt/juicefs-metadata.sqlite /mnt/object_storage --cache-dir=/var/jfsCache --buffer-size=8192 --prefetch=4 --cache-size=204800 --writeback --attr-cache=1 --entry-cache=1 --open-cache=1
Restart=on-failure
[Install]
WantedBy=multi-user.target