summaryrefslogtreecommitdiffstats
path: root/ansible/test/roles/prepare-docker-dind/tasks/rhel.yml
diff options
context:
space:
mode:
authorJan Benedikt <j.benedikt@partner.samsung.com>2020-03-17 11:39:38 +0100
committerJan Benedikt <j.benedikt@partner.samsung.com>2020-03-17 16:31:35 +0100
commit4fd6349133f5ffbd96795dedd4549ef0612c9ab5 (patch)
tree0032f80fcd8d1c3da7cae9abcee92bfdd92dfa50 /ansible/test/roles/prepare-docker-dind/tasks/rhel.yml
parentd0dbbca45c18a09dddf714453ca2c88bcd7a49f0 (diff)
Adding Ubuntu support in Ansible - docker-dind role
Extending ansible playbooks of ubuntu support. Issue-ID: OOM-1671 Signed-off-by: Jan Benedikt <j.benedikt@partner.samsung.com> Change-Id: I6028736b54ce825d3eae257ca61cb6efab19a913
Diffstat (limited to 'ansible/test/roles/prepare-docker-dind/tasks/rhel.yml')
-rw-r--r--ansible/test/roles/prepare-docker-dind/tasks/rhel.yml24
1 files changed, 24 insertions, 0 deletions
diff --git a/ansible/test/roles/prepare-docker-dind/tasks/rhel.yml b/ansible/test/roles/prepare-docker-dind/tasks/rhel.yml
new file mode 100644
index 00000000..4184ef05
--- /dev/null
+++ b/ansible/test/roles/prepare-docker-dind/tasks/rhel.yml
@@ -0,0 +1,24 @@
+---
+# 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"
+ 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
+ allow_downgrade: true
+ notify: Restart docker