Renamed health services

This commit is contained in:
Kevin Veen-Birkenbach 2023-11-16 15:32:29 +01:00
parent 8d04397b91
commit 51006074b4
47 changed files with 162 additions and 162 deletions

View File

@ -31,8 +31,8 @@ This software allows to setup the docker following applications:
This software shipts the following tools which are natively setup on the server:
- [Backups Cleanup](./roles/backups-cleanup-timer/README.md) - Cleans up old backups
- [Btrfs Health Check](./roles/btrfs-health-check/README.md) - Checks the health of Btrfs file systems
- [Docker Health Check](./roles/docker-health-check/) - Checks the health of docker containers
- [Btrfs Health Check](./roles/health-btrfs/README.md) - Checks the health of Btrfs file systems
- [Docker Health Check](./roles/health-docker/) - Checks the health of docker containers
- [Docker Reverse Proxy](./roles/docker-reverse-proxy/README.md) - Docker Reverse Proxy Solution
- [Docker Volume Backup](./roles/docker-volume-backup/) - Backup Solution for Docker Volumes
- [Pull Primary Backups](./roles/backups-consumer/README.md) - Pulls the backups from another server and stores them

View File

@ -11,9 +11,9 @@
roles:
- system-security
- journalctl
- disc-space-check
- health-disc-space
- free-disc-space
- btrfs-health-check
- health-btrfs
# Wireguard Rollen
- name: setup standard wireguard

View File

@ -1,12 +0,0 @@
- name: "reload btrfs-health-check.service"
systemd:
name: btrfs-health-check.service
state: reloaded
enabled: yes
daemon_reload: yes
- name: "restart btrfs-health-check.timer"
systemd:
name: btrfs-health-check.timer
state: restarted
enabled: yes
daemon_reload: yes

View File

@ -1,22 +0,0 @@
- name: "create {{docker_btrfs_health_check_folder}}"
file:
path: "{{docker_btrfs_health_check_folder}}"
state: directory
mode: 0755
- name: create btrfs-health-check.sh
copy:
src: btrfs-health-check.sh
dest: "{{docker_btrfs_health_check_folder}}btrfs-health-check.sh"
- name: create btrfs-health-check.service
template:
src: btrfs-health-check.service.j2
dest: /etc/systemd/system/btrfs-health-check.service
notify: reload btrfs-health-check.service
- name: create btrfs-health-check.timer
template:
src: btrfs-health-check.timer.j2
dest: "/etc/systemd/system/btrfs-health-check.timer"
notify: restart btrfs-health-check.timer

View File

@ -1,12 +0,0 @@
- name: "reload disc-space-check.service"
systemd:
name: disc-space-check.service
state: reloaded
enabled: yes
daemon_reload: yes
- name: "restart disc-space-check.timer"
systemd:
name: disc-space-check.timer
state: restarted
enabled: yes
daemon_reload: yes

View File

@ -1,22 +0,0 @@
- name: "create {{disc_space_check_folder}}"
file:
path: "{{disc_space_check_folder}}"
state: directory
mode: 0755
- name: create disc-space-check.sh
copy:
src: disc-space-check.sh
dest: "{{disc_space_check_folder}}disc-space-check.sh"
- name: create disc-space-check.service
template:
src: disc-space-check.service.j2
dest: /etc/systemd/system/disc-space-check.service
notify: reload disc-space-check.service
- name: create disc-space-check.timer
template:
src: disc-space-check.timer.j2
dest: /etc/systemd/system/disc-space-check.timer
notify: restart disc-space-check.timer

View File

@ -1,7 +0,0 @@
[Unit]
Description=checking disc space
OnFailure=systemd-notifier@%n.service
[Service]
Type=oneshot
ExecStart=/bin/bash {{disc_space_check_folder}}disc-space-check.sh {{size_percent_disc_space_warning}}

View File

@ -1 +0,0 @@
disc_space_check_folder: "{{path_administrator_scripts}}disc-space-check/"

View File

@ -1,12 +0,0 @@
- name: "reload docker-health-check.service"
systemd:
name: docker-health-check.service
state: reloaded
enabled: yes
daemon_reload: yes
- name: "restart docker-health-check.timer"
systemd:
name: docker-health-check.timer
state: restarted
enabled: yes
daemon_reload: yes

View File

@ -1,20 +0,0 @@
- name: "create {{docker_health_check_folder}}"
file:
path: "{{docker_health_check_folder}}"
state: directory
mode: 0755
- name: create docker-health-check.sh
copy:
src: docker-health-check.sh
dest: "{{docker_health_check_folder}}docker-health-check.sh"
- name: create docker-health-check.service
template: src=docker-health-check.service.j2 dest=/etc/systemd/system/docker-health-check.service
notify: reload docker-health-check.service
- name: create docker-health-check.timer
template:
src: docker-health-check.timer.j2
dest: "/etc/systemd/system/docker-health-check.timer"
notify: restart docker-health-check.timer

View File

@ -1 +0,0 @@
docker_health_check_folder: "{{path_administrator_scripts}}docker-health-check/"

View File

@ -1,5 +1,5 @@
dependencies:
- docker-volume-backup
- user-administrator
- docker-health-check
- health-docker
- docker-compose-restart-unhealthy

View File

@ -1,4 +1,4 @@
# btrfs-health-check
# health-btrfs
Sends a health report

View File

@ -0,0 +1,12 @@
- name: "reload health-btrfs.service"
systemd:
name: health-btrfs.service
state: reloaded
enabled: yes
daemon_reload: yes
- name: "restart health-btrfs.timer"
systemd:
name: health-btrfs.timer
state: restarted
enabled: yes
daemon_reload: yes

View File

@ -0,0 +1,22 @@
- name: "create {{docker_btrfs_health_check_folder}}"
file:
path: "{{docker_btrfs_health_check_folder}}"
state: directory
mode: 0755
- name: create health-btrfs.sh
copy:
src: health-btrfs.sh
dest: "{{docker_btrfs_health_check_folder}}health-btrfs.sh"
- name: create health-btrfs.service
template:
src: health-btrfs.service.j2
dest: /etc/systemd/system/health-btrfs.service
notify: reload health-btrfs.service
- name: create health-btrfs.timer
template:
src: health-btrfs.timer.j2
dest: "/etc/systemd/system/health-btrfs.timer"
notify: restart health-btrfs.timer

View File

@ -4,4 +4,4 @@ OnFailure=systemd-notifier@%n.service
[Service]
Type=oneshot
ExecStart=/bin/bash {{docker_btrfs_health_check_folder}}btrfs-health-check.sh
ExecStart=/bin/bash {{docker_btrfs_health_check_folder}}health-btrfs.sh

View File

@ -1,5 +1,5 @@
[Unit]
Description=starts btrfs-health-check.service
Description=starts health-btrfs.service
[Timer]
OnCalendar={{on_calendar_btrfs_health_check}}

View File

@ -1 +1 @@
docker_btrfs_health_check_folder: "{{path_administrator_scripts}}btrfs-health-check/"
docker_btrfs_health_check_folder: "{{path_administrator_scripts}}health-btrfs/"

View File

@ -1,2 +1,2 @@
# disc-space-check
# health-disc-space
Checks if enough disc space is free

View File

@ -0,0 +1,12 @@
- name: "reload health-disc-space.service"
systemd:
name: health-disc-space.service
state: reloaded
enabled: yes
daemon_reload: yes
- name: "restart health-disc-space.timer"
systemd:
name: health-disc-space.timer
state: restarted
enabled: yes
daemon_reload: yes

View File

@ -0,0 +1,22 @@
- name: "create {{disc_space_check_folder}}"
file:
path: "{{disc_space_check_folder}}"
state: directory
mode: 0755
- name: create health-disc-space.sh
copy:
src: health-disc-space.sh
dest: "{{disc_space_check_folder}}health-disc-space.sh"
- name: create health-disc-space.service
template:
src: health-disc-space.service.j2
dest: /etc/systemd/system/health-disc-space.service
notify: reload health-disc-space.service
- name: create health-disc-space.timer
template:
src: health-disc-space.timer.j2
dest: /etc/systemd/system/health-disc-space.timer
notify: restart health-disc-space.timer

View File

@ -0,0 +1,7 @@
[Unit]
Description=checking disc space
OnFailure=systemd-notifier@%n.service
[Service]
Type=oneshot
ExecStart=/bin/bash {{disc_space_check_folder}}health-disc-space.sh {{size_percent_disc_space_warning}}

View File

@ -1,5 +1,5 @@
[Unit]
Description=starts disc-space-check.service
Description=starts health-disc-space.service
[Timer]
OnCalendar={{on_calendar_disc_space_check}}

View File

@ -0,0 +1 @@
disc_space_check_folder: "{{path_administrator_scripts}}health-disc-space/"

View File

@ -0,0 +1,12 @@
- name: "reload health-docker.service"
systemd:
name: health-docker.service
state: reloaded
enabled: yes
daemon_reload: yes
- name: "restart health-docker.timer"
systemd:
name: health-docker.timer
state: restarted
enabled: yes
daemon_reload: yes

View File

@ -0,0 +1,20 @@
- name: "create {{docker_health_check_folder}}"
file:
path: "{{docker_health_check_folder}}"
state: directory
mode: 0755
- name: create health-docker.sh
copy:
src: health-docker.sh
dest: "{{docker_health_check_folder}}health-docker.sh"
- name: create health-docker.service
template: src=health-docker.service.j2 dest=/etc/systemd/system/health-docker.service
notify: reload health-docker.service
- name: create health-docker.timer
template:
src: health-docker.timer.j2
dest: "/etc/systemd/system/health-docker.timer"
notify: restart health-docker.timer

View File

@ -4,4 +4,4 @@ OnFailure=systemd-notifier@%n.service
[Service]
Type=oneshot
ExecStart=/bin/bash {{docker_health_check_folder}}docker-health-check.sh
ExecStart=/bin/bash {{docker_health_check_folder}}health-docker.sh

View File

@ -1,5 +1,5 @@
[Unit]
Description=starts docker-health-check.service
Description=starts health-docker.service
[Timer]
OnCalendar={{on_calendar_docker_health_check}}

View File

@ -0,0 +1 @@
docker_health_check_folder: "{{path_administrator_scripts}}health-docker/"

View File

@ -1,2 +1,2 @@
# journalctl-health-check
# health-journalctl
Checks journalctl for error messages

View File

@ -0,0 +1,13 @@
- name: "reload health-journalctl.service"
systemd:
name: health-journalctl.service
state: reloaded
enabled: yes
daemon_reload: yes
ignore_errors: true
- name: "restart health-journalctl.timer"
systemd:
name: health-journalctl.timer
state: restarted
enabled: yes
daemon_reload: yes

View File

@ -0,0 +1,22 @@
- name: "create {{journalctl_health_check_folder}}"
file:
path: "{{journalctl_health_check_folder}}"
state: directory
mode: 0755
- name: create health-journalctl.sh
copy:
src: health-journalctl.sh
dest: "{{journalctl_health_check_folder}}health-journalctl.sh"
- name: create health-journalctl.service
template:
src: health-journalctl.service.j2
dest: /etc/systemd/system/health-journalctl.service
notify: reload health-journalctl.service
- name: create health-journalctl.timer
template:
src: health-journalctl.timer.j2
dest: /etc/systemd/system/health-journalctl.timer
notify: restart health-journalctl.timer

View File

@ -4,4 +4,4 @@ OnFailure=systemd-notifier@%n.service
[Service]
Type=oneshot
ExecStart=/bin/bash {{journalctl_health_check_folder}}journalctl-health-check.sh
ExecStart=/bin/bash {{journalctl_health_check_folder}}health-journalctl.sh

View File

@ -1,5 +1,5 @@
[Unit]
Description=starts journalctl-health-check.service
Description=starts health-journalctl.service
[Timer]
OnCalendar={{on_calendar_journalctl_health_check}}

View File

@ -0,0 +1 @@
journalctl_health_check_folder: "{{path_administrator_scripts}}health-journalctl/"

View File

@ -1,13 +0,0 @@
- name: "reload journalctl-health-check.service"
systemd:
name: journalctl-health-check.service
state: reloaded
enabled: yes
daemon_reload: yes
ignore_errors: true
- name: "restart journalctl-health-check.timer"
systemd:
name: journalctl-health-check.timer
state: restarted
enabled: yes
daemon_reload: yes

View File

@ -1,22 +0,0 @@
- name: "create {{journalctl_health_check_folder}}"
file:
path: "{{journalctl_health_check_folder}}"
state: directory
mode: 0755
- name: create journalctl-health-check.sh
copy:
src: journalctl-health-check.sh
dest: "{{journalctl_health_check_folder}}journalctl-health-check.sh"
- name: create journalctl-health-check.service
template:
src: journalctl-health-check.service.j2
dest: /etc/systemd/system/journalctl-health-check.service
notify: reload journalctl-health-check.service
- name: create journalctl-health-check.timer
template:
src: journalctl-health-check.timer.j2
dest: /etc/systemd/system/journalctl-health-check.timer
notify: restart journalctl-health-check.timer

View File

@ -1 +0,0 @@
journalctl_health_check_folder: "{{path_administrator_scripts}}journalctl-health-check/"

View File

@ -1,2 +1,2 @@
dependencies:
- journalctl-health-check
- health-journalctl