Make 'prepare-docker' install proper docker-ce version
Docker-ce version should be aligned with Docker release
installed on target platform
(see build/creating_data/create-rhel-repo.sh)
This patch also optimizes package installation process
in Molecule tests.
Change-Id: I3f0cb7cd36a3f91027b2be43a925e54167d9c6d0
Issue-ID: OOM-1815
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
diff --git a/ansible/test/roles/prepare-docker/tasks/docker-packages.yml b/ansible/test/roles/prepare-docker/tasks/docker-packages.yml
new file mode 100644
index 0000000..b7e76c5
--- /dev/null
+++ b/ansible/test/roles/prepare-docker/tasks/docker-packages.yml
@@ -0,0 +1,8 @@
+---
+
+- name: Download docker related packages
+ command: yumdownloader --destdir="{{ rpm_dir }}" "{{ docker_ce_rpm }}" "{{ docker_ce_selinux_rpm }}"
+
+- name: Install docker related packages
+ yum:
+ name: "{{ rpm_dir + '/' + docker_ce_rpm + '.rpm'}},{{ rpm_dir + '/' + docker_ce_selinux_rpm + '.rpm' }}"