summaryrefslogtreecommitdiffstats
path: root/ansible/test/roles/prepare-docker-dind/tasks/rhel.yml
blob: 820d6964f1837c328a807f9645726ebab41e6658 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
---
# 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 }}"
      - "docker-ce-cli-{{ docker_version }}"
    state: present
    allow_downgrade: true
  notify: Restart docker