10 lines
240 B
Django/Jinja
10 lines
240 B
Django/Jinja
#!/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 |