Compare commits
No commits in common. "205b780ace87c94b43fc82e10ad3834cf1ebf18b" and "750dc27d460b3266f040a83f62856762d45b2965" have entirely different histories.
205b780ace
...
750dc27d46
26
main.yml
26
main.yml
@ -1,14 +1,14 @@
|
|||||||
---
|
---
|
||||||
#- hosts: iron-man.lan
|
- hosts: iron-man.lan
|
||||||
# roles:
|
roles:
|
||||||
# - ssh
|
- ssh
|
||||||
# - ubuntu
|
- ubuntu
|
||||||
#
|
|
||||||
#- hosts: prusa.lan
|
- hosts: prusa.lan
|
||||||
# roles:
|
roles:
|
||||||
# - ssh
|
- ssh
|
||||||
# - octoprint
|
- octoprint
|
||||||
# - ubuntu
|
- ubuntu
|
||||||
|
|
||||||
- hosts: docker_cluster
|
- hosts: docker_cluster
|
||||||
roles:
|
roles:
|
||||||
@ -16,7 +16,7 @@
|
|||||||
- docker-cluster
|
- docker-cluster
|
||||||
- ubuntu
|
- ubuntu
|
||||||
|
|
||||||
#- hosts: router.lan
|
- hosts: router.lan
|
||||||
# roles:
|
roles:
|
||||||
# - router
|
- router
|
||||||
|
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Create hostfile
|
|
||||||
become: yes
|
|
||||||
template:
|
|
||||||
src: usr/local/sbin/check-docker.j2
|
|
||||||
dest: /usr/local/sbin/check-docker
|
|
||||||
mode: '0755'
|
|
||||||
|
|
||||||
- name: create cron
|
|
||||||
become: yes
|
|
||||||
cron:
|
|
||||||
name: "check docker"
|
|
||||||
minute: "*/15"
|
|
||||||
job: "/usr/local/sbin/check-docker"
|
|
@ -11,4 +11,3 @@
|
|||||||
|
|
||||||
- import_tasks: hostfile.yml
|
- import_tasks: hostfile.yml
|
||||||
|
|
||||||
- import_tasks: docker-watcher.yml
|
|
@ -1,10 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
docker node inspect {{ ansible_hostname }} --format "{{ '{{' }} .Status.State {{ '}}' }}" | grep -q 'ready'
|
|
||||||
|
|
||||||
if [ $? == 1 ]; then
|
|
||||||
echo "Docker is down restarting"
|
|
||||||
service docker restart
|
|
||||||
else
|
|
||||||
echo "Docker is ok"
|
|
||||||
fi
|
|
Loading…
Reference in New Issue
Block a user