2017-02-24 05:08:18 +01:00
|
|
|
---
|
2017-05-10 04:36:53 +02:00
|
|
|
- name: Ensure old versions of Docker are not installed.
|
|
|
|
package:
|
|
|
|
name: '{{ item }}'
|
|
|
|
state: absent
|
|
|
|
with_items:
|
|
|
|
- docker
|
|
|
|
- docker-common
|
|
|
|
- docker-engine
|
|
|
|
|
2017-02-24 05:21:00 +01:00
|
|
|
- name: Add Docker GPG key.
|
|
|
|
rpm_key:
|
2017-05-10 04:36:53 +02:00
|
|
|
key: https://download.docker.com/linux/centos/gpg
|
2017-02-24 05:21:00 +01:00
|
|
|
state: present
|
2017-02-24 05:08:18 +01:00
|
|
|
|
|
|
|
- name: Add Docker repository.
|
2017-05-10 04:36:53 +02:00
|
|
|
get_url:
|
|
|
|
url: "{{ docker_yum_repo_url }}"
|
|
|
|
dest: '/etc/yum.repos.d/docker-{{ docker_edition }}.repo'
|
2017-02-24 05:21:00 +01:00
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
2017-05-10 04:36:53 +02:00
|
|
|
|
|
|
|
- name: Configure Docker Edge repo.
|
|
|
|
ini_file:
|
|
|
|
dest: '/etc/yum.repos.d/docker-{{ docker_edition }}.repo'
|
|
|
|
section: 'docker-{{ docker_edition }}-edge'
|
|
|
|
option: enabled
|
|
|
|
value: '{{ docker_yum_repo_enable_edge }}'
|
|
|
|
|
|
|
|
- name: Configure Docker Test repo.
|
|
|
|
ini_file:
|
|
|
|
dest: '/etc/yum.repos.d/docker-{{ docker_edition }}.repo'
|
|
|
|
section: 'docker-{{ docker_edition }}-test'
|
|
|
|
option: enabled
|
|
|
|
value: '{{ docker_yum_repo_enable_test }}'
|