aboutsummaryrefslogtreecommitdiffstats
path: root/ansible/roles/docker
diff options
context:
space:
mode:
authorVolodymyr Mytnyk <volodymyrx.mytnyk@intel.com>2019-04-10 11:53:33 +0000
committerGerrit Code Review <gerrit@opnfv.org>2019-04-10 11:53:33 +0000
commit841206158643423b957a9c39b7ff0b6bae58f3be (patch)
treecce6cea1564c85a1c226a3985559ff783396bac7 /ansible/roles/docker
parenta4f75aa4af079ae76a0da4350c344023d78c7d93 (diff)
parentc66efd482c9c4aabf8a82d1f554ef5fca91b3bcb (diff)
Merge "Add ansible scripts to deploy Kubernetes"
Diffstat (limited to 'ansible/roles/docker')
-rw-r--r--ansible/roles/docker/tasks/main.yml6
-rw-r--r--ansible/roles/docker/templates/daemon.json.j21
2 files changed, 6 insertions, 1 deletions
diff --git a/ansible/roles/docker/tasks/main.yml b/ansible/roles/docker/tasks/main.yml
index bbec371a8..18e441462 100644
--- a/ansible/roles/docker/tasks/main.yml
+++ b/ansible/roles/docker/tasks/main.yml
@@ -1,4 +1,4 @@
-# Copyright (c) 2017 Intel Corporation.
+# Copyright (c) 2017-2019 Intel Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -18,6 +18,10 @@
- name: create docker service config dir
file: path=/etc/systemd/system/docker.service.d state=directory
+ - name: docker configuration
+ template: src=daemon.json.j2 dest=/etc/docker/daemon.json owner=root mode=0644
+ when: 'docker_daemon_config is defined'
+
- name: create docker proxy config
template: src=http-proxy-conf.j2 dest=/etc/systemd/system/docker.service.d/http-proxy.conf owner=root mode=0644
when: 'proxy_env is defined and "http_proxy" in proxy_env or "https_proxy" in proxy_env'
diff --git a/ansible/roles/docker/templates/daemon.json.j2 b/ansible/roles/docker/templates/daemon.json.j2
new file mode 100644
index 000000000..57bdc9f63
--- /dev/null
+++ b/ansible/roles/docker/templates/daemon.json.j2
@@ -0,0 +1 @@
+{{ docker_daemon_config | to_nice_json }}