summaryrefslogtreecommitdiffstats
path: root/ansible/test/roles/prepare-docker-dind/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/test/roles/prepare-docker-dind/tasks/main.yml')
-rw-r--r--ansible/test/roles/prepare-docker-dind/tasks/main.yml23
1 files changed, 23 insertions, 0 deletions
diff --git a/ansible/test/roles/prepare-docker-dind/tasks/main.yml b/ansible/test/roles/prepare-docker-dind/tasks/main.yml
new file mode 100644
index 00000000..3e109e87
--- /dev/null
+++ b/ansible/test/roles/prepare-docker-dind/tasks/main.yml
@@ -0,0 +1,23 @@
+---
+# Needed because host system has all mounts by default to shared, and
+# some things may depend on mounts being shared if we run docker inside
+# test env.
+- name: "Make all mounts shared"
+ command: "mount --make-rshared /"
+ args:
+ warn: false
+
+- name: "Enable docker repository"
+ yum_repository:
+ name: "Docker"
+ description: Docker-ce repository
+ enabled: yes
+ baseurl: "https://download.docker.com/linux/centos/7/$basearch/stable"
+ gpgcheck: yes
+ gpgkey: https://download.docker.com/linux/centos/gpg
+
+- name: "Install docker"
+ package:
+ name: "docker-ce-{{ docker_version }}"
+ state: present
+ notify: Restart docker