Skip to content

Commit

Permalink
roles/zfs: don't disable services that aren't there
Browse files Browse the repository at this point in the history
Signed-off-by: John Helmert III <[email protected]>
  • Loading branch information
ajakk committed Nov 19, 2023
1 parent 68b032c commit d33701f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions roles/zfs/tasks/remove.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
---
- name: Populate service facts
ansible.builtin.service_facts:
- name: Remove zfs cron jobs
ansible.builtin.file:
path: "/etc/{{ item }}"
state: absent
with_items: "{{ zfs_cronjobs }}"
- name: Stop and disable zfs services
when: item in ansible_facts.services
ansible.builtin.service:
name: "{{ item }}"
state: stopped
Expand Down

0 comments on commit d33701f

Please sign in to comment.