Skip to content

Commit

Permalink
unionfs: only stop service if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
saltydk committed Sep 9, 2023
1 parent 4c1b692 commit 57e4ef9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions roles/unionfs/tasks/subtasks/mergerfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,16 @@
# GNU General Public License v3.0 #
#########################################################################
---
- name: "Check if 'saltbox_managed_mergerfs.service' exists"
ansible.builtin.stat:
path: "/etc/systemd/system/mergerfs.service"
register: saltbox_managed_mergerfs_status

- name: "MergerFS | Stop 'saltbox_managed_mergerfs.service'"
ansible.builtin.systemd:
name: saltbox_managed_mergerfs.service
state: stopped
when: saltbox_managed_mergerfs_status.stat.exists

- name: "MergerFS | Get URL for latest mergerfs release"
ansible.builtin.shell: "{{ mergerfs_release_lookup_command }}"
Expand Down

0 comments on commit 57e4ef9

Please sign in to comment.