mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-25 06:01:04 +01:00
renamed to heal-docker
This commit is contained in:
parent
2170862d5f
commit
333d1078f8
@ -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
|
@ -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
|
@ -2,4 +2,4 @@ dependencies:
|
||||
- backup-docker-to-local
|
||||
- user-administrator
|
||||
- health-docker
|
||||
- docker-compose-restart-unhealthy
|
||||
- heal-docker
|
||||
|
@ -1,2 +1,2 @@
|
||||
# docker-compose-restart-unhealthy
|
||||
# heal-docker
|
||||
docker-compose restart for containers which are unhealty or excited
|
12
roles/heal-docker/handlers/main.yml
Normal file
12
roles/heal-docker/handlers/main.yml
Normal 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
|
22
roles/heal-docker/tasks/main.yml
Normal file
22
roles/heal-docker/tasks/main.yml
Normal 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
|
@ -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
|
@ -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}}
|
@ -1 +1 @@
|
||||
docker_compose_restart_unhealthy: "{{path_administrator_scripts}}docker-compose-restart-unhealthy/"
|
||||
docker_compose_restart_unhealthy: "{{path_administrator_scripts}}heal-docker/"
|
Loading…
Reference in New Issue
Block a user