mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Shorted maintenance- to maint-
This commit is contained in:
@@ -72,10 +72,10 @@ For a complete list of role categories and detailed definitions, see:
|
||||
|
||||
## Maintenance & Healing
|
||||
|
||||
- **maintenance-***
|
||||
- **maint-***
|
||||
Periodic maintenance tasks (Btrfs balancing, swapfile management).
|
||||
|
||||
- **maintenance-docker-***
|
||||
- **maint-docker-***
|
||||
Automated recovery and restarts for Docker Compose workloads.
|
||||
|
||||
- **cleanup-***
|
||||
@@ -112,7 +112,7 @@ For a complete list of role categories and detailed definitions, see:
|
||||
|
||||
> **Tip:** To find a role quickly, search for its prefix:
|
||||
> `core-`, `generic-`, `desk-`, `webserver-`, `web-service-`, `web-app-`,
|
||||
> `network-`, `service-`, `monitor-`, `alert-`, `maintenance-`, `cleanup-`,
|
||||
> `network-`, `service-`, `monitor-`, `alert-`, `maint-`, `cleanup-`,
|
||||
> `backup-`, `update-`, `pkgmgr-`, `user-`.
|
||||
|
||||
---
|
||||
|
@@ -24,4 +24,4 @@ galaxy_info:
|
||||
documentation: https://s.veen.world/cymais
|
||||
dependencies:
|
||||
- cleanup-backups-service
|
||||
- maintenance-lock
|
||||
- maint-lock
|
||||
|
@@ -11,7 +11,7 @@ Optimized for Archlinux, this role ensures that Docker volume backups are perfor
|
||||
- [cleanup-failed-docker-backups](../cleanup-failed-docker-backups/) – Cleans up unsuccessful backup attempts.
|
||||
- [generic-timer](../generic-timer/) – Schedules recurring backup tasks.
|
||||
- [backup-provider](../backup-provider/) – Manages backup sources.
|
||||
- [maintenance-lock](../maintenance-lock/) – Ensures coordinated maintenance operations.
|
||||
- [maint-lock](../maint-lock/) – Ensures coordinated maintenance operations.
|
||||
|
||||
## Purpose
|
||||
|
||||
|
@@ -26,5 +26,5 @@ dependencies:
|
||||
- backup-provider
|
||||
- alert-compose
|
||||
- cleanup-failed-docker-backups
|
||||
- maintenance-lock
|
||||
- maint-lock
|
||||
- backup-directory-validator
|
@@ -6,4 +6,4 @@ OnFailure=alert-compose.cymais@%n.service cleanup-failed-docker-backups.cymais.s
|
||||
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 maintenance-docker-heal.cymais.service &'
|
||||
ExecStartPost=/bin/sh -c '/bin/systemctl start maint-docker-heal.cymais.service &'
|
@@ -6,4 +6,4 @@ OnFailure=alert-compose.cymais@%n.service cleanup-failed-docker-backups.cymais.s
|
||||
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 maintenance-docker-heal.cymais.service &'
|
||||
ExecStartPost=/bin/sh -c '/bin/systemctl start maint-docker-heal.cymais.service &'
|
@@ -17,7 +17,7 @@ Backup Remote to Local is a robust solution for retrieving backup data from remo
|
||||
- **Remote Backup Retrieval:** Pulls backups from a remote server using secure SSH connections.
|
||||
- **Incremental Backup with rsync:** Uses rsync with options for archive, backup, and hard linking to efficiently manage changes.
|
||||
- **Retry Logic:** Implements a retry mechanism to handle transient network issues or remote errors.
|
||||
- **Integration with Other Roles:** Works alongside roles like backup-directory-validator, cleanup-failed-docker-backups, generic-timer, backup-provider, and maintenance-lock.
|
||||
- **Integration with Other Roles:** Works alongside roles like backup-directory-validator, cleanup-failed-docker-backups, generic-timer, backup-provider, and maint-lock.
|
||||
- **Administrative Debugging:** Detailed debug instructions and administrative tasks are provided in a separate file.
|
||||
|
||||
## Other Resources
|
||||
|
@@ -29,5 +29,5 @@ dependencies:
|
||||
- alert-compose
|
||||
- cleanup-backups-timer
|
||||
- cleanup-failed-docker-backups
|
||||
- maintenance-lock
|
||||
- maint-lock
|
||||
- user-root
|
||||
|
@@ -24,4 +24,4 @@ galaxy_info:
|
||||
dependencies:
|
||||
- generic-python-pip
|
||||
- alert-compose
|
||||
- maintenance-lock
|
||||
- maint-lock
|
||||
|
@@ -23,4 +23,4 @@ galaxy_info:
|
||||
documentation: "https://s.veen.world/cymais"
|
||||
dependencies:
|
||||
- alert-compose
|
||||
- maintenance-lock
|
||||
- maint-lock
|
||||
|
@@ -23,5 +23,5 @@ galaxy_info:
|
||||
documentation: "https://s.veen.world/cymais"
|
||||
dependencies:
|
||||
- alert-compose
|
||||
- maintenance-lock
|
||||
- maint-lock
|
||||
- backup-directory-validator
|
||||
|
@@ -31,5 +31,5 @@ dependencies:
|
||||
- user-administrator
|
||||
- mon-bot-docker-container
|
||||
- mon-bot-docker-volumes
|
||||
- maintenance-docker-heal
|
||||
- maintenance-docker-restart
|
||||
- maint-docker-heal
|
||||
- maint-docker-restart
|
||||
|
@@ -16,7 +16,7 @@
|
||||
group: administrator
|
||||
when: run_once_docker is not defined
|
||||
|
||||
- name: Set docker_enabled to true, to activate maintenance-docker-storage-optimizer
|
||||
- name: Set docker_enabled to true, to activate maint-docker-storage-optimizer
|
||||
set_fact:
|
||||
docker_enabled: true
|
||||
when: run_once_docker is not defined
|
||||
|
4
roles/maint-btrfs-auto-balancer/handlers/main.yml
Normal file
4
roles/maint-btrfs-auto-balancer/handlers/main.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
- name: "reload maint-btrfs-auto-balancer.cymais.service"
|
||||
systemd:
|
||||
name: maint-btrfs-auto-balancer.cymais.service
|
||||
daemon_reload: yes
|
@@ -5,11 +5,11 @@
|
||||
package_name: btrfs-auto-balancer
|
||||
when: run_once_system_btrfs_auto_balancer is not defined
|
||||
|
||||
- name: configure maintenance-btrfs-auto-balancer.cymais.service
|
||||
- name: configure maint-btrfs-auto-balancer.cymais.service
|
||||
template:
|
||||
src: maintenance-btrfs-auto-balancer.service.j2
|
||||
dest: /etc/systemd/system/maintenance-btrfs-auto-balancer.cymais.service
|
||||
notify: reload maintenance-btrfs-auto-balancer.cymais.service
|
||||
src: maint-btrfs-auto-balancer.service.j2
|
||||
dest: /etc/systemd/system/maint-btrfs-auto-balancer.cymais.service
|
||||
notify: reload maint-btrfs-auto-balancer.cymais.service
|
||||
when: run_once_system_btrfs_auto_balancer is not defined
|
||||
|
||||
- name: set service_name to the name of the current role
|
5
roles/maint-docker-heal/handlers/main.yml
Normal file
5
roles/maint-docker-heal/handlers/main.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
- name: restart maint-docker-heal.cymais.service
|
||||
systemd:
|
||||
name: maint-docker-heal.cymais.service
|
||||
state: restarted
|
||||
daemon_reload: yes
|
@@ -23,4 +23,4 @@ galaxy_info:
|
||||
issue_tracker_url: https://s.veen.world/cymaisissues
|
||||
documentation: https://s.veen.world/cymais
|
||||
dependencies:
|
||||
- maintenance-lock
|
||||
- maint-lock
|
@@ -5,18 +5,18 @@
|
||||
mode: 0755
|
||||
when: run_once_heal_docker is not defined
|
||||
|
||||
- name: create maintenance-docker-heal.py
|
||||
- name: create maint-docker-heal.py
|
||||
copy:
|
||||
src: maintenance-docker-heal.py
|
||||
dest: "{{heal_docker}}maintenance-docker-heal.py"
|
||||
notify: restart maintenance-docker-heal.cymais.service
|
||||
src: maint-docker-heal.py
|
||||
dest: "{{heal_docker}}maint-docker-heal.py"
|
||||
notify: restart maint-docker-heal.cymais.service
|
||||
when: run_once_heal_docker is not defined
|
||||
|
||||
- name: create maintenance-docker-heal.cymais.service
|
||||
- name: create maint-docker-heal.cymais.service
|
||||
template:
|
||||
src: maintenance-docker-heal.service.j2
|
||||
dest: /etc/systemd/system/maintenance-docker-heal.cymais.service
|
||||
notify: restart maintenance-docker-heal.cymais.service
|
||||
src: maint-docker-heal.service.j2
|
||||
dest: /etc/systemd/system/maint-docker-heal.cymais.service
|
||||
notify: restart maint-docker-heal.cymais.service
|
||||
when: run_once_heal_docker is not defined
|
||||
|
||||
- name: set service_name to the name of the current role
|
@@ -4,5 +4,5 @@ OnFailure=alert-compose.cymais@%n.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_lock_script }} {{ system_maintenance_services | join(' ') }} --ignore {{system_maintenance_cleanup_services| join(' ') }} maintenance-docker-heal --timeout "{{system_maintenance_lock_timeout_heal_docker}}"'
|
||||
ExecStart=/bin/sh -c '/bin/python {{heal_docker}}maintenance-docker-heal.py {{path_docker_compose_instances}}'
|
||||
ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_lock_script }} {{ system_maintenance_services | join(' ') }} --ignore {{system_maintenance_cleanup_services| join(' ') }} maint-docker-heal --timeout "{{system_maintenance_lock_timeout_heal_docker}}"'
|
||||
ExecStart=/bin/sh -c '/bin/python {{heal_docker}}maint-docker-heal.py {{path_docker_compose_instances}}'
|
1
roles/maint-docker-heal/vars/main.yml
Normal file
1
roles/maint-docker-heal/vars/main.yml
Normal file
@@ -0,0 +1 @@
|
||||
heal_docker: "{{path_administrator_scripts}}maint-docker-heal/"
|
5
roles/maint-docker-restart/handlers/main.yml
Normal file
5
roles/maint-docker-restart/handlers/main.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
- name: "reload maint-docker-restart.cymais.service"
|
||||
systemd:
|
||||
name: maint-docker-restart.cymais.service
|
||||
enabled: yes
|
||||
daemon_reload: yes
|
@@ -26,4 +26,4 @@ galaxy_info:
|
||||
issue_tracker_url: "https://s.veen.world/cymaisissues"
|
||||
documentation: "https://s.veen.world/cymais"
|
||||
dependencies:
|
||||
- maintenance-lock
|
||||
- maint-lock
|
@@ -7,14 +7,14 @@
|
||||
|
||||
- name: create {{restart_docker_script}}
|
||||
copy:
|
||||
src: maintenance-docker-restart.py
|
||||
src: maint-docker-restart.py
|
||||
dest: "{{restart_docker_script}}"
|
||||
|
||||
- name: configure maintenance-docker-restart.cymais.service
|
||||
- name: configure maint-docker-restart.cymais.service
|
||||
template:
|
||||
src: maintenance-docker-restart.service.j2
|
||||
dest: /etc/systemd/system/maintenance-docker-restart.cymais.service
|
||||
notify: "reload maintenance-docker-restart.cymais.service"
|
||||
src: maint-docker-restart.service.j2
|
||||
dest: /etc/systemd/system/maint-docker-restart.cymais.service
|
||||
notify: "reload maint-docker-restart.cymais.service"
|
||||
|
||||
- name: set service_name to the name of the current role
|
||||
set_fact:
|
@@ -4,5 +4,5 @@ OnFailure=alert-compose.cymais@%n.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_lock_script }} {{ system_maintenance_services | join(' ') }} --ignore {{system_maintenance_cleanup_services | join(' ') }} maintenance-docker-restart --timeout "{{system_maintenance_lock_timeout_restart_docker}}"'
|
||||
ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_lock_script }} {{ system_maintenance_services | join(' ') }} --ignore {{system_maintenance_cleanup_services | join(' ') }} maint-docker-restart --timeout "{{system_maintenance_lock_timeout_restart_docker}}"'
|
||||
ExecStart=/bin/sh -c '/usr/bin/python {{restart_docker_script}} {{path_docker_compose_instances}}'
|
2
roles/maint-docker-restart/vars/main.yml
Normal file
2
roles/maint-docker-restart/vars/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
restart_docker_folder: "{{path_administrator_scripts}}maint-docker-restart/"
|
||||
restart_docker_script: "{{restart_docker_folder}}maint-docker-restart.py"
|
5
roles/maint-docker-storage-optimizer/handlers/main.yml
Normal file
5
roles/maint-docker-storage-optimizer/handlers/main.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
- name: "reload maint-docker-storage-optimizer.cymais.service"
|
||||
systemd:
|
||||
name: maint-docker-storage-optimizer.cymais.service
|
||||
state: reloaded
|
||||
daemon_reload: yes
|
22
roles/maint-docker-storage-optimizer/tasks/main.yml
Normal file
22
roles/maint-docker-storage-optimizer/tasks/main.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
- name: "create {{storage_optimizer_directory}}"
|
||||
file:
|
||||
path: "{{storage_optimizer_directory}}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: create maint-docker-storage-optimizer.cymais.service
|
||||
template:
|
||||
src: maint-docker-storage-optimizer.service.j2
|
||||
dest: /etc/systemd/system/maint-docker-storage-optimizer.cymais.service
|
||||
notify: reload maint-docker-storage-optimizer.cymais.service
|
||||
|
||||
- name: create maint-docker-storage-optimizer.py
|
||||
copy:
|
||||
src: maint-docker-storage-optimizer.py
|
||||
dest: "{{storage_optimizer_script}}"
|
||||
mode: 0755
|
||||
|
||||
- name: "optimize storage performance"
|
||||
systemd:
|
||||
name: maint-docker-storage-optimizer.cymais.service
|
||||
state: started
|
@@ -4,5 +4,5 @@ OnFailure=alert-compose.cymais@%n.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_lock_script }} {{ system_maintenance_services | join(' ') }} --ignore maintenance-docker-storage-optimizer backup-remote-to-local --timeout "{{system_maintenance_lock_timeout_storage_optimizer}}"'
|
||||
ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_lock_script }} {{ system_maintenance_services | join(' ') }} --ignore maint-docker-storage-optimizer backup-remote-to-local --timeout "{{system_maintenance_lock_timeout_storage_optimizer}}"'
|
||||
ExecStart=/bin/sh -c '/usr/bin/python {{storage_optimizer_script}} --rapid-storage-path {{path_rapid_storage}} --mass-storage-path {{path_mass_storage}}'
|
@@ -1,2 +1,2 @@
|
||||
storage_optimizer_directory: "{{path_administrator_scripts}}maintenance-docker-storage-optimizer/"
|
||||
storage_optimizer_script: "{{storage_optimizer_directory}}maintenance-docker-storage-optimizer.py"
|
||||
storage_optimizer_directory: "{{path_administrator_scripts}}maint-docker-storage-optimizer/"
|
||||
storage_optimizer_script: "{{storage_optimizer_directory}}maint-docker-storage-optimizer.py"
|
@@ -1,7 +1,7 @@
|
||||
---
|
||||
- name: create {{path_system_lock_script}}
|
||||
copy:
|
||||
src: maintenance-lock.py
|
||||
src: maint-lock.py
|
||||
dest: "{{path_system_lock_script}}"
|
||||
when: run_once_system_maintenance_lock is not defined
|
||||
|
@@ -1,4 +0,0 @@
|
||||
- name: "reload maintenance-btrfs-auto-balancer.cymais.service"
|
||||
systemd:
|
||||
name: maintenance-btrfs-auto-balancer.cymais.service
|
||||
daemon_reload: yes
|
@@ -1,5 +0,0 @@
|
||||
- name: restart maintenance-docker-heal.cymais.service
|
||||
systemd:
|
||||
name: maintenance-docker-heal.cymais.service
|
||||
state: restarted
|
||||
daemon_reload: yes
|
@@ -1 +0,0 @@
|
||||
heal_docker: "{{path_administrator_scripts}}maintenance-docker-heal/"
|
@@ -1,5 +0,0 @@
|
||||
- name: "reload maintenance-docker-restart.cymais.service"
|
||||
systemd:
|
||||
name: maintenance-docker-restart.cymais.service
|
||||
enabled: yes
|
||||
daemon_reload: yes
|
@@ -1,2 +0,0 @@
|
||||
restart_docker_folder: "{{path_administrator_scripts}}maintenance-docker-restart/"
|
||||
restart_docker_script: "{{restart_docker_folder}}maintenance-docker-restart.py"
|
@@ -1,5 +0,0 @@
|
||||
- name: "reload maintenance-docker-storage-optimizer.cymais.service"
|
||||
systemd:
|
||||
name: maintenance-docker-storage-optimizer.cymais.service
|
||||
state: reloaded
|
||||
daemon_reload: yes
|
@@ -1,22 +0,0 @@
|
||||
- name: "create {{storage_optimizer_directory}}"
|
||||
file:
|
||||
path: "{{storage_optimizer_directory}}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: create maintenance-docker-storage-optimizer.cymais.service
|
||||
template:
|
||||
src: maintenance-docker-storage-optimizer.service.j2
|
||||
dest: /etc/systemd/system/maintenance-docker-storage-optimizer.cymais.service
|
||||
notify: reload maintenance-docker-storage-optimizer.cymais.service
|
||||
|
||||
- name: create maintenance-docker-storage-optimizer.py
|
||||
copy:
|
||||
src: maintenance-docker-storage-optimizer.py
|
||||
dest: "{{storage_optimizer_script}}"
|
||||
mode: 0755
|
||||
|
||||
- name: "optimize storage performance"
|
||||
systemd:
|
||||
name: maintenance-docker-storage-optimizer.cymais.service
|
||||
state: started
|
@@ -27,4 +27,4 @@ galaxy_info:
|
||||
issue_tracker_url: "https://s.veen.world/cymaisissues"
|
||||
documentation: "https://s.veen.world/cymais"
|
||||
dependencies:
|
||||
- maintenance-lock
|
||||
- maint-lock
|
||||
|
Reference in New Issue
Block a user