Merge "install-docker: add option to use buildset registry"

This commit is contained in:
Zuul 2020-03-17 01:00:01 +00:00 committed by Gerrit Code Review
commit 75e3b15939
4 changed files with 17 additions and 2 deletions

View File

@ -18,6 +18,13 @@ An ansible role to install docker and configure it to use mirrors if available.
By default this role adds repositories to install docker from upstream By default this role adds repositories to install docker from upstream
docker. Set this to False to use the docker that comes with the distro. docker. Set this to False to use the docker that comes with the distro.
.. zuul:rolevar:: docker_use_buildset_registry
:default: False
This role does not enable the usage of the buildset registry by default,
this variable allows enabling the usage of the buildset registry after
installing Docker.
.. zuul:rolevar:: docker_compose_install .. zuul:rolevar:: docker_compose_install
:default: False :default: False

View File

@ -1,5 +1,6 @@
use_upstream_docker: True use_upstream_docker: True
docker_group: docker docker_group: docker
docker_use_buildset_registry: false
# NOTE(cloudnull): Packages are loaded through distro specific variables. # NOTE(cloudnull): Packages are loaded through distro specific variables.
# The default option will return an empty list which # The default option will return an empty list which
# allows folks to override these lists as they see fit. # allows folks to override these lists as they see fit.

View File

@ -80,3 +80,11 @@
- name: Dump installed docker details - name: Dump installed docker details
debug: debug:
msg: '{{ docker_installed_version }}' msg: '{{ docker_installed_version }}'
- name: Use buildset registry
include_role:
name: use-buildset-registry
vars:
buildset_registry_docker_user: root
when:
- docker_use_buildset_registry | bool

View File

@ -2,8 +2,7 @@
roles: roles:
- role: clear-firewall - role: clear-firewall
- role: install-kubernetes - role: install-kubernetes
- role: use-buildset-registry docker_use_buildset_registry: true
buildset_registry_docker_user: root
tasks: tasks:
- name: Wait for cluster to come up - name: Wait for cluster to come up
command: kubectl cluster-info command: kubectl cluster-info