Fix prechecks fail with docker not in deployment host

This changes only evaluates baremetal host group
to look for docker versions.

Change-Id: I64a7314b332958d003f88a00aa73ba79a760a051
Closes-Bug: #1700986
This commit is contained in:
Eduardo Gonzalez 2017-06-29 09:18:33 +01:00
parent 161607f97c
commit 3b7ab63a19
2 changed files with 2 additions and 0 deletions

View File

@ -3,6 +3,7 @@
command: "{{ ansible_python.executable }} -c \"import docker; print docker.__version__\""
register: result
changed_when: false
when: inventory_hostname in groups['baremetal']
failed_when: result | failed or
result.stdout | version_compare(docker_py_version_min, '<')

View File

@ -3,6 +3,7 @@
command: docker version
register: result
changed_when: false
when: inventory_hostname in groups['baremetal']
failed_when: result | failed
or (result.stdout | from_yaml).Server.Version | regex_replace('(\\d+\\.\\d+\\.\\d+).*', '\\1') | version_compare(docker_version_min, '<')