prepare-docker-dind: make docker start optional
This change makes it possible to disable docker start after
prepare-docker-dind role executes.
Needed for docker role that wants to start docker by itself.
Note that the docker role also tries to install docker by itself, and
prepare-docker-dind does the same.
The reason is that it makes it possible to fix the version of installed docker.
Change-Id: I7487bc46b316c0e6c782b22d8e24afea35c3c2d5
Issue-ID: OOM-1863
Signed-off-by: Michal Zegan <m.zegan@samsung.com>
diff --git a/ansible/test/roles/prepare-docker-dind/defaults/main.yml b/ansible/test/roles/prepare-docker-dind/defaults/main.yml
new file mode 100644
index 0000000..2489014
--- /dev/null
+++ b/ansible/test/roles/prepare-docker-dind/defaults/main.yml
@@ -0,0 +1,3 @@
+---
+# Variable specifying if we should install docker, or only prepare for it
+start_docker: true
diff --git a/ansible/test/roles/prepare-docker-dind/handlers/main.yml b/ansible/test/roles/prepare-docker-dind/handlers/main.yml
index 698e3d3..cfea773 100644
--- a/ansible/test/roles/prepare-docker-dind/handlers/main.yml
+++ b/ansible/test/roles/prepare-docker-dind/handlers/main.yml
@@ -3,3 +3,4 @@
name: docker
enabled: true
state: restarted
+ when: start_docker == true