mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-06 02:11:42 +02:00
Huge role refactoring/cleanup. Other commits will propably follow. Because some bugs will exist. Still important for longrun and also for auto docs/help/slideshow generation
This commit is contained in:
@@ -9,9 +9,9 @@ This Ansible role automates the process of backing up Docker volumes to a local
|
||||
Optimized for Archlinux, this role ensures that Docker volume backups are performed reliably with minimal manual intervention. It integrates with several dependent roles to verify backup success and manage related tasks, including:
|
||||
- [backup-directory-validator](../backup-directory-validator/) – Validates backup directories.
|
||||
- [cleanup-failed-docker-backups](../cleanup-failed-docker-backups/) – Cleans up unsuccessful backup attempts.
|
||||
- [systemd-timer](../systemd-timer/) – Schedules recurring backup tasks.
|
||||
- [generic-timer](../generic-timer/) – Schedules recurring backup tasks.
|
||||
- [backup-provider](../backup-provider/) – Manages backup sources.
|
||||
- [system-maintenance-lock](../system-maintenance-lock/) – Ensures coordinated maintenance operations.
|
||||
- [maintenance-lock](../maintenance-lock/) – Ensures coordinated maintenance operations.
|
||||
|
||||
## Purpose
|
||||
|
||||
|
@@ -24,7 +24,7 @@ galaxy_info:
|
||||
documentation: "https://s.veen.world/cymais"
|
||||
dependencies:
|
||||
- backup-provider
|
||||
- systemd-notifier
|
||||
- alert-core
|
||||
- cleanup-failed-docker-backups
|
||||
- system-maintenance-lock
|
||||
- maintenance-lock
|
||||
- backup-directory-validator
|
@@ -36,9 +36,9 @@
|
||||
service_name: "{{ role_name }}"
|
||||
when: run_once_backup_docker_to_local is not defined
|
||||
|
||||
- name: "include role for systemd-timer for {{service_name}}"
|
||||
- name: "include role for generic-timer for {{service_name}}"
|
||||
include_role:
|
||||
name: systemd-timer
|
||||
name: generic-timer
|
||||
vars:
|
||||
on_calendar: "{{on_calendar_backup_docker_to_local}}"
|
||||
when: run_once_backup_docker_to_local is not defined
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# This file is also used by docker-matrix
|
||||
# This file is also used by web-app-matrix
|
||||
|
||||
- name: "Display all database variables"
|
||||
debug:
|
||||
|
@@ -1,9 +1,9 @@
|
||||
[Unit]
|
||||
Description=backup docker volumes to local folder
|
||||
OnFailure=systemd-notifier.cymais@%n.service cleanup-failed-docker-backups.cymais.service
|
||||
OnFailure=alert-core.cymais@%n.service cleanup-failed-docker-backups.cymais.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_lock_script }} {{ system_maintenance_services | join(' ') }} --ignore {{ system_maintenance_backup_services | reject('equalto', 'backup-docker-to-local') | join(' ') }} --timeout "{{system_maintenance_lock_timeout_backup_services}}"'
|
||||
ExecStart=/bin/sh -c '/usr/bin/python {{backup_docker_to_local_folder}}backup-docker-to-local.py --compose-dir {{path_docker_compose_instances}} --everything'
|
||||
ExecStartPost=/bin/sh -c '/bin/systemctl start heal-docker.cymais.service &'
|
||||
ExecStartPost=/bin/sh -c '/bin/systemctl start maintenance-docker-heal.cymais.service &'
|
@@ -1,9 +1,9 @@
|
||||
[Unit]
|
||||
Description=backup docker volumes to local folder
|
||||
OnFailure=systemd-notifier.cymais@%n.service cleanup-failed-docker-backups.cymais.service
|
||||
OnFailure=alert-core.cymais@%n.service cleanup-failed-docker-backups.cymais.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_lock_script }} {{ system_maintenance_services | join(' ') }} --ignore {{ system_maintenance_backup_services | reject('equalto', 'backup-docker-to-local-everything') | join(' ') }} --timeout "{{system_maintenance_lock_timeout_backup_services}}"'
|
||||
ExecStart=/bin/sh -c '/usr/bin/python {{backup_docker_to_local_folder}}backup-docker-to-local.py --compose-dir {{path_docker_compose_instances}}'
|
||||
ExecStartPost=/bin/sh -c '/bin/systemctl start heal-docker.cymais.service &'
|
||||
ExecStartPost=/bin/sh -c '/bin/systemctl start maintenance-docker-heal.cymais.service &'
|
Reference in New Issue
Block a user