renamed to heal-docker

This commit is contained in:
Kevin Veen-Birkenbach 2023-11-16 18:42:39 +01:00
parent db112f3efa
commit c913d1f62c
10 changed files with 39 additions and 39 deletions

View File

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

View File

@ -1,22 +0,0 @@
- name: "create {{docker_compose_restart_unhealthy}}"
file:
path: "{{docker_compose_restart_unhealthy}}"
state: directory
mode: 0755
- name: create docker-compose-restart-unhealthy.py
copy:
src: docker-compose-restart-unhealthy.py
dest: "{{docker_compose_restart_unhealthy}}docker-compose-restart-unhealthy.py"
- name: create docker-compose-restart-unhealthy.service
template:
src: docker-compose-restart-unhealthy.service.j2
dest: /etc/systemd/system/docker-compose-restart-unhealthy.service
notify: reload docker-compose-restart-unhealthy.service
- name: create docker-compose-restart-unhealthy.timer
template:
src: docker-compose-restart-unhealthy.timer.j2
dest: "/etc/systemd/system/docker-compose-restart-unhealthy.timer"
notify: restart docker-compose-restart-unhealthy.timer

View File

@ -2,4 +2,4 @@ dependencies:
- backup-docker-to-local
- user-administrator
- health-docker
- docker-compose-restart-unhealthy
- heal-docker

View File

@ -1,2 +1,2 @@
# docker-compose-restart-unhealthy
# heal-docker
docker-compose restart for containers which are unhealty or excited

View File

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

View File

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

View File

@ -4,4 +4,4 @@ OnFailure=systemd-notifier@%n.service
[Service]
Type=oneshot
ExecStart=/bin/python {{docker_compose_restart_unhealthy}}docker-compose-restart-unhealthy.py
ExecStart=/bin/python {{docker_compose_restart_unhealthy}}heal-docker.py

View File

@ -1,5 +1,5 @@
[Unit]
Description=starts docker-compose-restart-unhealthy.service
Description=starts heal-docker.service
[Timer]
OnCalendar={{on_calendar_docker_compose_restart_unhealthy}}

View File

@ -1 +1 @@
docker_compose_restart_unhealthy: "{{path_administrator_scripts}}docker-compose-restart-unhealthy/"
docker_compose_restart_unhealthy: "{{path_administrator_scripts}}heal-docker/"