From 4c36b9964dd24240ec0c368c9fdc2ecc9ce0fde7 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Sat, 25 May 2024 20:56:04 +0200 Subject: [PATCH] Revert "remove restic (#648)" This reverts commit 170e788c9b94621b7666a032b30eac1ed33f2ba2. --- playbooks/base/system.yml | 2 + playbooks/on-off/remove_restic.yml | 78 ------------------- {friedhof => roles}/mgrote_restic/README.md | 0 .../mgrote_restic/defaults/main.yml | 0 .../mgrote_restic/handlers/main.yml | 0 .../mgrote_restic/tasks/main.yml | 0 .../templates/media-restic.automount.j2 | 0 .../templates/media-restic.mount.j2 | 0 .../mgrote_restic/templates/restic.env.j2 | 0 .../mgrote_restic/templates/restic.service.j2 | 0 .../mgrote_restic/templates/restic.timer.j2 | 0 .../templates/restic_mail.service.j2 | 0 .../mgrote_restic/templates/smb.cred.j2 | 0 13 files changed, 2 insertions(+), 78 deletions(-) delete mode 100644 playbooks/on-off/remove_restic.yml rename {friedhof => roles}/mgrote_restic/README.md (100%) rename {friedhof => roles}/mgrote_restic/defaults/main.yml (100%) rename {friedhof => roles}/mgrote_restic/handlers/main.yml (100%) rename {friedhof => roles}/mgrote_restic/tasks/main.yml (100%) rename {friedhof => roles}/mgrote_restic/templates/media-restic.automount.j2 (100%) rename {friedhof => roles}/mgrote_restic/templates/media-restic.mount.j2 (100%) rename {friedhof => roles}/mgrote_restic/templates/restic.env.j2 (100%) rename {friedhof => roles}/mgrote_restic/templates/restic.service.j2 (100%) rename {friedhof => roles}/mgrote_restic/templates/restic.timer.j2 (100%) rename {friedhof => roles}/mgrote_restic/templates/restic_mail.service.j2 (100%) rename {friedhof => roles}/mgrote_restic/templates/smb.cred.j2 (100%) diff --git a/playbooks/base/system.yml b/playbooks/base/system.yml index aafe625c..cb4e54ed 100644 --- a/playbooks/base/system.yml +++ b/playbooks/base/system.yml @@ -7,6 +7,8 @@ tags: "etckeeper" - role: mgrote_postfix tags: "postfix" + - role: mgrote_restic + tags: "restic" - role: mgrote_fail2ban tags: "f2b" - role: mgrote_fwupd_settings diff --git a/playbooks/on-off/remove_restic.yml b/playbooks/on-off/remove_restic.yml deleted file mode 100644 index d04f39db..00000000 --- a/playbooks/on-off/remove_restic.yml +++ /dev/null @@ -1,78 +0,0 @@ ---- -- 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 diff --git a/friedhof/mgrote_restic/README.md b/roles/mgrote_restic/README.md similarity index 100% rename from friedhof/mgrote_restic/README.md rename to roles/mgrote_restic/README.md diff --git a/friedhof/mgrote_restic/defaults/main.yml b/roles/mgrote_restic/defaults/main.yml similarity index 100% rename from friedhof/mgrote_restic/defaults/main.yml rename to roles/mgrote_restic/defaults/main.yml diff --git a/friedhof/mgrote_restic/handlers/main.yml b/roles/mgrote_restic/handlers/main.yml similarity index 100% rename from friedhof/mgrote_restic/handlers/main.yml rename to roles/mgrote_restic/handlers/main.yml diff --git a/friedhof/mgrote_restic/tasks/main.yml b/roles/mgrote_restic/tasks/main.yml similarity index 100% rename from friedhof/mgrote_restic/tasks/main.yml rename to roles/mgrote_restic/tasks/main.yml diff --git a/friedhof/mgrote_restic/templates/media-restic.automount.j2 b/roles/mgrote_restic/templates/media-restic.automount.j2 similarity index 100% rename from friedhof/mgrote_restic/templates/media-restic.automount.j2 rename to roles/mgrote_restic/templates/media-restic.automount.j2 diff --git a/friedhof/mgrote_restic/templates/media-restic.mount.j2 b/roles/mgrote_restic/templates/media-restic.mount.j2 similarity index 100% rename from friedhof/mgrote_restic/templates/media-restic.mount.j2 rename to roles/mgrote_restic/templates/media-restic.mount.j2 diff --git a/friedhof/mgrote_restic/templates/restic.env.j2 b/roles/mgrote_restic/templates/restic.env.j2 similarity index 100% rename from friedhof/mgrote_restic/templates/restic.env.j2 rename to roles/mgrote_restic/templates/restic.env.j2 diff --git a/friedhof/mgrote_restic/templates/restic.service.j2 b/roles/mgrote_restic/templates/restic.service.j2 similarity index 100% rename from friedhof/mgrote_restic/templates/restic.service.j2 rename to roles/mgrote_restic/templates/restic.service.j2 diff --git a/friedhof/mgrote_restic/templates/restic.timer.j2 b/roles/mgrote_restic/templates/restic.timer.j2 similarity index 100% rename from friedhof/mgrote_restic/templates/restic.timer.j2 rename to roles/mgrote_restic/templates/restic.timer.j2 diff --git a/friedhof/mgrote_restic/templates/restic_mail.service.j2 b/roles/mgrote_restic/templates/restic_mail.service.j2 similarity index 100% rename from friedhof/mgrote_restic/templates/restic_mail.service.j2 rename to roles/mgrote_restic/templates/restic_mail.service.j2 diff --git a/friedhof/mgrote_restic/templates/smb.cred.j2 b/roles/mgrote_restic/templates/smb.cred.j2 similarity index 100% rename from friedhof/mgrote_restic/templates/smb.cred.j2 rename to roles/mgrote_restic/templates/smb.cred.j2