diff --git a/roles/install-docker/README.rst b/roles/install-docker/README.rst index b794d2df5..7d540a20e 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. Which update channel to use for upstream docker. The two choices are ``stable``, which is the default and updates quarterly, and ``edge`` which updates monthly. + +.. zuul:rolevar:: docker_version + :default: undefined + + Declare this with the version of the docker package to install. + Undefined will install the latest. This will look something like + ``18.06.1~ce~3-0~ubuntu``. Only supported when using upstream + docker repos. diff --git a/roles/install-docker/tasks/upstream.yaml b/roles/install-docker/tasks/upstream.yaml index ca5463c3a..b25c0dfd4 100644 --- a/roles/install-docker/tasks/upstream.yaml +++ b/roles/install-docker/tasks/upstream.yaml @@ -27,6 +27,6 @@ - name: Install docker become: yes apt: - name: docker-ce + name: "docker-ce{% if docker_version is defined %}={{ docker_version }}{% endif %}" state: present update_cache: yes