mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-09 22:41:03 +01:00
Renamed health services
This commit is contained in:
parent
04f69aefde
commit
d9d6c8060a
@ -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:
|
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
|
- [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
|
- [Btrfs Health Check](./roles/health-btrfs/README.md) - Checks the health of Btrfs file systems
|
||||||
- [Docker Health Check](./roles/docker-health-check/) - Checks the health of docker containers
|
- [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 Reverse Proxy](./roles/docker-reverse-proxy/README.md) - Docker Reverse Proxy Solution
|
||||||
- [Docker Volume Backup](./roles/docker-volume-backup/) - Backup Solution for Docker Volumes
|
- [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
|
- [Pull Primary Backups](./roles/backups-consumer/README.md) - Pulls the backups from another server and stores them
|
||||||
|
@ -11,9 +11,9 @@
|
|||||||
roles:
|
roles:
|
||||||
- system-security
|
- system-security
|
||||||
- journalctl
|
- journalctl
|
||||||
- disc-space-check
|
- health-disc-space
|
||||||
- free-disc-space
|
- free-disc-space
|
||||||
- btrfs-health-check
|
- health-btrfs
|
||||||
|
|
||||||
# Wireguard Rollen
|
# Wireguard Rollen
|
||||||
- name: setup standard wireguard
|
- name: setup standard wireguard
|
||||||
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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}}
|
|
@ -1 +0,0 @@
|
|||||||
disc_space_check_folder: "{{path_administrator_scripts}}disc-space-check/"
|
|
@ -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
|
|
@ -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
|
|
@ -1 +0,0 @@
|
|||||||
docker_health_check_folder: "{{path_administrator_scripts}}docker-health-check/"
|
|
@ -1,5 +1,5 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- docker-volume-backup
|
- docker-volume-backup
|
||||||
- user-administrator
|
- user-administrator
|
||||||
- docker-health-check
|
- health-docker
|
||||||
- docker-compose-restart-unhealthy
|
- docker-compose-restart-unhealthy
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# btrfs-health-check
|
# health-btrfs
|
||||||
|
|
||||||
Sends a health report
|
Sends a health report
|
||||||
|
|
12
roles/health-btrfs/handlers/main.yml
Normal file
12
roles/health-btrfs/handlers/main.yml
Normal 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
|
22
roles/health-btrfs/tasks/main.yml
Normal file
22
roles/health-btrfs/tasks/main.yml
Normal 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
|
@ -4,4 +4,4 @@ OnFailure=systemd-notifier@%n.service
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
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
|
@ -1,5 +1,5 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=starts btrfs-health-check.service
|
Description=starts health-btrfs.service
|
||||||
|
|
||||||
[Timer]
|
[Timer]
|
||||||
OnCalendar={{on_calendar_btrfs_health_check}}
|
OnCalendar={{on_calendar_btrfs_health_check}}
|
@ -1 +1 @@
|
|||||||
docker_btrfs_health_check_folder: "{{path_administrator_scripts}}btrfs-health-check/"
|
docker_btrfs_health_check_folder: "{{path_administrator_scripts}}health-btrfs/"
|
@ -1,2 +1,2 @@
|
|||||||
# disc-space-check
|
# health-disc-space
|
||||||
Checks if enough disc space is free
|
Checks if enough disc space is free
|
12
roles/health-disc-space/handlers/main.yml
Normal file
12
roles/health-disc-space/handlers/main.yml
Normal 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
|
22
roles/health-disc-space/tasks/main.yml
Normal file
22
roles/health-disc-space/tasks/main.yml
Normal 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
|
@ -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}}
|
@ -1,5 +1,5 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=starts disc-space-check.service
|
Description=starts health-disc-space.service
|
||||||
|
|
||||||
[Timer]
|
[Timer]
|
||||||
OnCalendar={{on_calendar_disc_space_check}}
|
OnCalendar={{on_calendar_disc_space_check}}
|
1
roles/health-disc-space/vars/main.yml
Normal file
1
roles/health-disc-space/vars/main.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
disc_space_check_folder: "{{path_administrator_scripts}}health-disc-space/"
|
12
roles/health-docker/handlers/main.yml
Normal file
12
roles/health-docker/handlers/main.yml
Normal 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
|
20
roles/health-docker/tasks/main.yml
Normal file
20
roles/health-docker/tasks/main.yml
Normal 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
|
@ -4,4 +4,4 @@ OnFailure=systemd-notifier@%n.service
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
ExecStart=/bin/bash {{docker_health_check_folder}}docker-health-check.sh
|
ExecStart=/bin/bash {{docker_health_check_folder}}health-docker.sh
|
@ -1,5 +1,5 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=starts docker-health-check.service
|
Description=starts health-docker.service
|
||||||
|
|
||||||
[Timer]
|
[Timer]
|
||||||
OnCalendar={{on_calendar_docker_health_check}}
|
OnCalendar={{on_calendar_docker_health_check}}
|
1
roles/health-docker/vars/main.yml
Normal file
1
roles/health-docker/vars/main.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
docker_health_check_folder: "{{path_administrator_scripts}}health-docker/"
|
@ -1,2 +1,2 @@
|
|||||||
# journalctl-health-check
|
# health-journalctl
|
||||||
Checks journalctl for error messages
|
Checks journalctl for error messages
|
13
roles/health-journalctl/handlers/main.yml
Normal file
13
roles/health-journalctl/handlers/main.yml
Normal 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
|
22
roles/health-journalctl/tasks/main.yml
Normal file
22
roles/health-journalctl/tasks/main.yml
Normal 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
|
@ -4,4 +4,4 @@ OnFailure=systemd-notifier@%n.service
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
ExecStart=/bin/bash {{journalctl_health_check_folder}}journalctl-health-check.sh
|
ExecStart=/bin/bash {{journalctl_health_check_folder}}health-journalctl.sh
|
@ -1,5 +1,5 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=starts journalctl-health-check.service
|
Description=starts health-journalctl.service
|
||||||
|
|
||||||
[Timer]
|
[Timer]
|
||||||
OnCalendar={{on_calendar_journalctl_health_check}}
|
OnCalendar={{on_calendar_journalctl_health_check}}
|
1
roles/health-journalctl/vars/main.yml
Normal file
1
roles/health-journalctl/vars/main.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
journalctl_health_check_folder: "{{path_administrator_scripts}}health-journalctl/"
|
@ -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
|
|
@ -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
|
|
@ -1 +0,0 @@
|
|||||||
journalctl_health_check_folder: "{{path_administrator_scripts}}journalctl-health-check/"
|
|
@ -1,2 +1,2 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
- journalctl-health-check
|
- health-journalctl
|
||||||
|
Loading…
Reference in New Issue
Block a user