899bd89833
There are two different ways to install docker - from upstream repos or from distro. At the moment each of these carries with it the need for a different caching proxy setup. Add a role that will install docker from upstream by default, but which also supports installing directly from distros. The role also sets up the registry proxy appropriately for each. This role at the moment only works on ubuntu. It should obviously be updated to work on centos and fedora as well. Needed-By: https://review.openstack.org/580160 Change-Id: I7d6bac68a2c0fecf13a8bd9535a3fdeb85e7d999
33 lines
623 B
YAML
33 lines
623 B
YAML
- name: Install pre-reqs
|
|
package:
|
|
name: "{{ item }}"
|
|
state: present
|
|
with_items:
|
|
- apt-transport-https
|
|
- ca-certificates
|
|
- curl
|
|
- software-properties-common
|
|
become: yes
|
|
|
|
- name: Add docker GPG key
|
|
become: yes
|
|
apt_key:
|
|
data: "{{ ubuntu_gpg_key }}"
|
|
|
|
# TODO(mordred) We should add a proxy cache mirror for this
|
|
- name: Add docker apt repo
|
|
become: yes
|
|
template:
|
|
dest: /etc/apt/sources.list.d/docker.list
|
|
group: root
|
|
mode: 0644
|
|
owner: root
|
|
src: sources.list.j2
|
|
|
|
- name: Install docker
|
|
become: yes
|
|
apt:
|
|
name: docker-ce
|
|
state: present
|
|
update_cache: yes
|