kolla-ansible/ansible/roles/prechecks/tasks/service_checks.yml
Vladislav Belogrudov 3bd4c2a607 Add playbook for hosts pre-deployment checks (ports, files)
This playbook runs on hosts before deployment to be sure we don't
have any conflicting services running and systems are in expected
state.

DocImpact

Change-Id: If5f288b7fbdf269697ca834da4eb969b61683ca0
Partially-implements: blueprint precheck-tasks
2015-11-13 16:35:33 +03:00

14 lines
608 B
YAML

---
- name: Checking that libvirt is not running
stat: path=/var/run/libvirt/libvirt-sock
register: result
failed_when: result.stat.exists
when: inventory_hostname in groups['compute']
- name: Checking Docker version
command: docker version
register: result
failed_when: result | failed
or (result.stdout | from_yaml).Server.Version | regex_replace('(\\d+\\.\\d+\\.\\d+).*', '\\1') | version_compare(docker_version_min, '<')
or (result.stdout | from_yaml).Server.Version | regex_replace('(\\d+\\.\\d+\\.\\d+).*', '\\1') | version_compare(docker_version_max, '>')