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
31 lines
667 B
YAML
31 lines
667 B
YAML
- name: Set mirror_fqdn fact
|
|
when:
|
|
- mirror_fqdn is not defined
|
|
- zuul_site_mirror_fqdn is defined
|
|
set_fact:
|
|
mirror_fqdn: "{{ zuul_site_mirror_fqdn }}"
|
|
|
|
- name: Set up docker mirrors
|
|
include: mirror.yaml
|
|
when: mirror_fqdn is defined
|
|
static: no
|
|
|
|
- name: Install docker-ce from upstream
|
|
include: upstream.yaml
|
|
when: use_upstream_docker
|
|
|
|
- name: Install docker-engine from distro
|
|
include: distro.yaml
|
|
when: not use_upstream_docker
|
|
|
|
- name: Add user to docker group
|
|
become: yes
|
|
user:
|
|
name: "{{ ansible_user }}"
|
|
groups:
|
|
- docker
|
|
append: yes
|
|
|
|
- name: reset ssh connection to pick up docker group
|
|
meta: reset_connection
|