summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Wienand <iwienand@redhat.com>2018-11-08 12:52:20 +1100
committerAndreas Jaeger <jaegerandi@gmail.com>2018-11-08 07:10:29 +0000
commit0a7adc6ddeb96cb8620e56a00781b1a9f65c9829 (patch)
tree9e553c5158fb9537bd2f2207141def04cbe8926c
parent76fdb33658995b6ddcbad5f66b74bc1d93aae509 (diff)
install-docker: add package version option
Add a variable to allow selecting a specific docker version. Useful if a new docker releases but your jobs aren't quite ready. Change-Id: Ie4c178d966474476fd2de4489738e47e8a641834
Notes
Notes (review): Code-Review+2: Andreas Jaeger <jaegerandi@gmail.com> Code-Review+2: Tobias Henkel <tobias.henkel@bmw.de> Workflow+1: Tobias Henkel <tobias.henkel@bmw.de> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Thu, 08 Nov 2018 10:23:09 +0000 Reviewed-on: https://review.openstack.org/616391 Project: openstack-infra/zuul-jobs Branch: refs/heads/master
-rw-r--r--roles/install-docker/README.rst8
-rw-r--r--roles/install-docker/tasks/upstream.yaml2
2 files changed, 9 insertions, 1 deletions
diff --git a/roles/install-docker/README.rst b/roles/install-docker/README.rst
index b794d2d..7d540a2 100644
--- a/roles/install-docker/README.rst
+++ b/roles/install-docker/README.rst
@@ -24,3 +24,11 @@ An ansible role to install docker and configure it to use mirrors if available.
24 Which update channel to use for upstream docker. The two choices are 24 Which update channel to use for upstream docker. The two choices are
25 ``stable``, which is the default and updates quarterly, and ``edge`` 25 ``stable``, which is the default and updates quarterly, and ``edge``
26 which updates monthly. 26 which updates monthly.
27
28.. zuul:rolevar:: docker_version
29 :default: undefined
30
31 Declare this with the version of the docker package to install.
32 Undefined will install the latest. This will look something like
33 ``18.06.1~ce~3-0~ubuntu``. Only supported when using upstream
34 docker repos.
diff --git a/roles/install-docker/tasks/upstream.yaml b/roles/install-docker/tasks/upstream.yaml
index ca5463c..b25c0df 100644
--- a/roles/install-docker/tasks/upstream.yaml
+++ b/roles/install-docker/tasks/upstream.yaml
@@ -27,6 +27,6 @@
27- name: Install docker 27- name: Install docker
28 become: yes 28 become: yes
29 apt: 29 apt:
30 name: docker-ce 30 name: "docker-ce{% if docker_version is defined %}={{ docker_version }}{% endif %}"
31 state: present 31 state: present
32 update_cache: yes 32 update_cache: yes