Michal Zegan | c2996af | 2019-05-07 14:31:43 +0200 | [diff] [blame] | 1 | --- |
| 2 | # Needed because host system has all mounts by default to shared, and |
| 3 | # some things may depend on mounts being shared if we run docker inside |
| 4 | # test env. |
| 5 | - name: "Make all mounts shared" |
| 6 | command: "mount --make-rshared /" |
| 7 | args: |
| 8 | warn: false |
| 9 | |
| 10 | - name: "Enable docker repository" |
| 11 | yum_repository: |
| 12 | name: "Docker" |
| 13 | description: Docker-ce repository |
| 14 | enabled: yes |
| 15 | baseurl: "https://download.docker.com/linux/centos/7/$basearch/stable" |
| 16 | gpgcheck: yes |
| 17 | gpgkey: https://download.docker.com/linux/centos/gpg |
| 18 | |
| 19 | - name: "Install docker" |
| 20 | package: |
| 21 | name: "docker-ce-{{ docker_version }}" |
| 22 | state: present |
Michal Zegan | cb5c09e | 2019-06-19 14:45:15 +0200 | [diff] [blame] | 23 | allow_downgrade: true |
Michal Zegan | c2996af | 2019-05-07 14:31:43 +0200 | [diff] [blame] | 24 | notify: Restart docker |