feat: manage JuiceFS service state during Redis operations
Some checks failed
Nix Format Check / check-format (push) Waiting to run
Python Lint Check / check-python (push) Waiting to run
Ansible Lint Check / check-ansible (push) Has been cancelled

This commit is contained in:
Menno van Leeuwen 2025-03-14 17:37:47 +01:00
parent 49d978ae22
commit 80ec188190
Signed by: vleeuwenmenno
SSH Key Fingerprint: SHA256:OJFmjANpakwD3F2Rsws4GLtbdz1TJ5tkQF0RZmF0TRE

View File

@ -28,6 +28,14 @@
vars: vars:
REDIS_PASSWORD: "{{ redis_password }}" REDIS_PASSWORD: "{{ redis_password }}"
- name: Stop juicefs.service to umount JuiceFS
ansible.builtin.systemd:
name: juicefs.service
state: stopped
enabled: false
register: juicefs_stop
changed_when: juicefs_stop.changed
- name: Stop Redis service - name: Stop Redis service
ansible.builtin.command: docker compose -f "{{ redis_service_dir }}/docker-compose.yml" down --remove-orphans ansible.builtin.command: docker compose -f "{{ redis_service_dir }}/docker-compose.yml" down --remove-orphans
register: redis_stop register: redis_stop
@ -38,6 +46,14 @@
register: redis_start register: redis_start
changed_when: redis_start.rc == 0 changed_when: redis_start.rc == 0
- name: Start juicefs.service to mount JuiceFS
ansible.builtin.systemd:
name: juicefs.service
state: started
enabled: true
register: juicefs_start
changed_when: juicefs_start.changed
- name: Wait for Redis to be ready - name: Wait for Redis to be ready
ansible.builtin.wait_for: ansible.builtin.wait_for:
host: localhost host: localhost