From 13e0b60cbe15a1eca5083b81e678c846744fe164 Mon Sep 17 00:00:00 2001 From: KGoreczny Date: Mon, 11 Jul 2016 11:35:32 +0200 Subject: [PATCH] Fix for Ansible 2.1: install docker-py in version matched to ansible docker module Signed-off-by: KGoreczny --- roles/ceph-mds/tasks/docker/pre_requisite.yml | 10 ++++++++++ roles/ceph-mon/tasks/docker/pre_requisite.yml | 9 +++++++++ roles/ceph-osd/tasks/docker/pre_requisite.yml | 9 +++++++++ 3 files changed, 28 insertions(+) diff --git a/roles/ceph-mds/tasks/docker/pre_requisite.yml b/roles/ceph-mds/tasks/docker/pre_requisite.yml index 880543aa5..8633426fd 100644 --- a/roles/ceph-mds/tasks/docker/pre_requisite.yml +++ b/roles/ceph-mds/tasks/docker/pre_requisite.yml @@ -115,3 +115,13 @@ version: 1.1.0 tags: with_pkg + when: ansible_version['full'] | version_compare('2.1.0.0', '<') + +- name: install docker-py + pip: + name: docker-py + state: latest + tags: + with_pkg + when: ansible_version['full'] | version_compare('2.1.0.0', '>=') + diff --git a/roles/ceph-mon/tasks/docker/pre_requisite.yml b/roles/ceph-mon/tasks/docker/pre_requisite.yml index d3012fff3..34a4ea96c 100644 --- a/roles/ceph-mon/tasks/docker/pre_requisite.yml +++ b/roles/ceph-mon/tasks/docker/pre_requisite.yml @@ -117,3 +117,12 @@ version: 1.1.0 tags: with_pkg + when: ansible_version['full'] | version_compare('2.1.0.0', '<') + +- name: install docker-py + pip: + name: docker-py + state: latest + tags: + with_pkg + when: ansible_version['full'] | version_compare('2.1.0.0', '>=') diff --git a/roles/ceph-osd/tasks/docker/pre_requisite.yml b/roles/ceph-osd/tasks/docker/pre_requisite.yml index 98f3f3432..bfd4b3163 100644 --- a/roles/ceph-osd/tasks/docker/pre_requisite.yml +++ b/roles/ceph-osd/tasks/docker/pre_requisite.yml @@ -116,3 +116,12 @@ version: 1.1.0 tags: with_pkg + when: ansible_version['full'] | version_compare('2.1.0.0', '<') + +- name: install docker-py + pip: + name: docker-py + state: latest + tags: + with_pkg + when: ansible_version['full'] | version_compare('2.1.0.0', '>=')