pvc-ansible/roles/pvc/tasks/autobackup/disable.yml

28 lines
656 B
YAML
Raw Permalink Normal View History

2023-10-27 02:07:49 -04:00
---
- name: disable timer units
systemd:
name: "{{ item }}"
state: stopped
enabled: false
loop:
- pvc-autobackup-normal.timer
- pvc-autobackup-full.timer
2024-01-09 12:07:45 -05:00
ignore_errors: yes
2023-10-27 02:07:49 -04:00
- name: remove autobackup configurations
file:
dest: "{{ item }}"
state: absent
loop:
- /etc/systemd/system/pvc-autobackup-normal.timer
- /etc/systemd/system/pvc-autobackup-normal.service
- /etc/systemd/system/pvc-autobackup-full.timer
- /etc/systemd/system/pvc-autobackup-full.service
register: systemd
ignore_errors: yes
- name: reload systemd to apply changes
command: systemctl daemon-reload
when: systemd.changed