remove restic (#648)
Reviewed-on: #648 Co-authored-by: Michael Grote <michael.grote@posteo.de> Co-committed-by: Michael Grote <michael.grote@posteo.de>
This commit is contained in:
parent
3d73e3eabf
commit
170e788c9b
13 changed files with 78 additions and 2 deletions
|
@ -5,8 +5,6 @@
|
||||||
tags: "ntp"
|
tags: "ntp"
|
||||||
- role: mgrote_postfix
|
- role: mgrote_postfix
|
||||||
tags: "postfix"
|
tags: "postfix"
|
||||||
- role: mgrote_restic
|
|
||||||
tags: "restic"
|
|
||||||
- role: mgrote_fail2ban
|
- role: mgrote_fail2ban
|
||||||
tags: "f2b"
|
tags: "f2b"
|
||||||
- role: mgrote_fwupd_settings
|
- role: mgrote_fwupd_settings
|
||||||
|
|
78
playbooks/on-off/remove_restic.yml
Normal file
78
playbooks/on-off/remove_restic.yml
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
---
|
||||||
|
- hosts: all
|
||||||
|
tasks:
|
||||||
|
- name: ensure group exists
|
||||||
|
become: true
|
||||||
|
ansible.builtin.group:
|
||||||
|
name: restic
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
- name: install restic-packages
|
||||||
|
become: true
|
||||||
|
ansible.builtin.package:
|
||||||
|
name:
|
||||||
|
- restic
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
- name: create "/etc/restic"
|
||||||
|
become: true
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "/etc/restic"
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
- name: systemctl start restic.timer
|
||||||
|
become: true
|
||||||
|
ansible.builtin.systemd:
|
||||||
|
name: restic.timer
|
||||||
|
state: stopped
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
|
||||||
|
- name: systemctl enable units
|
||||||
|
become: true
|
||||||
|
ansible.builtin.systemd:
|
||||||
|
name: "{{ item }}"
|
||||||
|
enabled: false
|
||||||
|
masked: true
|
||||||
|
with_items:
|
||||||
|
- media-restic.automount
|
||||||
|
- media-restic.mount
|
||||||
|
- restic.service
|
||||||
|
- restic.timer
|
||||||
|
- restic_mail.service
|
||||||
|
|
||||||
|
- name: template restic.mount
|
||||||
|
become: true
|
||||||
|
ansible.builtin.file:
|
||||||
|
state: absent
|
||||||
|
path: /etc/systemd/system/media-restic.mount # media-restic == /media/restic
|
||||||
|
|
||||||
|
- name: template restic.automount
|
||||||
|
become: true
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /etc/systemd/system/media-restic.automount
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
- name: template restic.service
|
||||||
|
become: true
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /etc/systemd/system/restic.service
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
- name: template restic.timer
|
||||||
|
become: true
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /etc/systemd/system/restic.timer
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
- name: template restic_mail.service
|
||||||
|
become: true
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /etc/systemd/system/restic_mail.service
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
- name: template restic_mail.service
|
||||||
|
become: true
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /etc/systemd/system/media-restic.automount
|
||||||
|
state: absent
|
Loading…
Reference in a new issue