summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2019-02-05 16:11:35 +0000
committerGerrit Code Review <review@openstack.org>2019-02-05 16:11:35 +0000
commit4f71cfa8494ea68ac2d4b922a7faa0dc3213d288 (patch)
tree0d9cc8dd91492d344dba27534cae3a33f5a3b5a8
parentbb0788ff0c1cab900dda6a631d329f2f5e36485b (diff)
parente3e450650b4ddfaeeb8539e031be59dbb3b1f884 (diff)
Merge "Add docker insecure registries feature"
-rw-r--r--roles/install-docker/README.rst7
-rw-r--r--roles/install-docker/templates/daemon.json.j21
2 files changed, 8 insertions, 0 deletions
diff --git a/roles/install-docker/README.rst b/roles/install-docker/README.rst
index 7d540a2..e820cb1 100644
--- a/roles/install-docker/README.rst
+++ b/roles/install-docker/README.rst
@@ -32,3 +32,10 @@ An ansible role to install docker and configure it to use mirrors if available.
32 Undefined will install the latest. This will look something like 32 Undefined will install the latest. This will look something like
33 ``18.06.1~ce~3-0~ubuntu``. Only supported when using upstream 33 ``18.06.1~ce~3-0~ubuntu``. Only supported when using upstream
34 docker repos. 34 docker repos.
35
36.. zuul:rolevar:: docker_insecure_registries
37 :default: undefined
38
39 Declare this with a list of insecure registries to define the
40 registries which are allowed to communicate with HTTP only or
41 HTTPS with no valid certificate.
diff --git a/roles/install-docker/templates/daemon.json.j2 b/roles/install-docker/templates/daemon.json.j2
index 1e6f158..2520818 100644
--- a/roles/install-docker/templates/daemon.json.j2
+++ b/roles/install-docker/templates/daemon.json.j2
@@ -1,3 +1,4 @@
1{ 1{
2 {% if docker_insecure_registries is defined -%}"insecure-registries": {{ docker_insecure_registries | to_json }},{% endif %}
2 "registry-mirrors": ["{{ docker_mirror }}"] 3 "registry-mirrors": ["{{ docker_mirror }}"]
3} 4}