kolla-ansible/ansible/roles/prechecks/tasks/package_checks.yml
Allen Gao 9ec425ae15 prechecks: check ansible version on deployment host
Change-Id: I688ac5cba128e7eae9df9f51c48273e39fdb09a9
Partially-implements: blueprint precheck-tasks
2016-01-21 15:54:39 +08:00

12 lines
454 B
YAML

---
- name: Checking docker-py version
command: python -c "import docker; print docker.__version__"
register: result
failed_when: result | failed or
result.stdout | version_compare(docker_py_version_min, '<')
- name: Checking Ansible version
local_action: command ansible --version
register: result
failed_when: result.stdout | regex_replace('ansible (\\d+\\.\\d+\\.\\d+)', '\\1') | version_compare(ansible_version_max, '>=')