revert changes

This commit is contained in:
Frank Dornheim 2023-03-15 21:06:16 +01:00
parent 6376bbf2fb
commit dfeec30910

View File

@ -20,29 +20,34 @@
- name: Populate service facts - name: Populate service facts
ansible.builtin.service_facts: ansible.builtin.service_facts:
- name: Stop borgmatic services # If the role is running and the repo is not yet initialized, an error will occur.
ansible.builtin.systemd: # Therefore the service is stopped by default and must be started manually.
name: "{{ item }}" - name: Stop fresh installed backup.timer and backup.service
state: stopped when: ('backup.service' not in services)
enabled: false block:
masked: false - name: Stop borgmatic services
daemon_reload: true ansible.builtin.systemd:
when: "item in services" name: "{{ item }}"
with_items: state: stopped
- backup.service enabled: false
masked: false
# bug: Need own section without masked else the timer are skipped daemon_reload: true
- name: Stop borgmatic timers when: "item in services"
ansible.builtin.systemd: with_items:
name: "{{ item }}" - backup.service
state: stopped
enabled: false # bug: Need own section without masked else the timer are skipped
daemon_reload: true - name: Stop borgmatic timers
with_items: ansible.builtin.systemd:
- "backup.timer" name: "{{ item }}"
state: stopped
enabled: false
daemon_reload: true
with_items:
- "backup.timer"
- name: Show hints - name: Show hints
when: "'backup_init_repo' not in ansible_run_tags" when: "'backup_init_repo' not in ansible_run_tags"
ansible.builtin.debug: ansible.builtin.debug:
msg: "Attention: Since the repo was not initialized automatically, the systemd service (backup.service) and the timer (backup.timer) are not activated." msg: "Attention: Since the repo was not initialized automatically, the systemd service (backup.service) and the timer (backup.timer) are not activated."
... ...