From 8be9398afade515f1d0a511c13231106979402b7 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Sun, 5 May 2019 11:34:01 +0000 Subject: [PATCH] [docker] add daemon config (dns) --- roles/docker/files/daemon.json | 6 ++++++ roles/docker/handlers/main.yml | 5 +++++ roles/docker/tasks/config.yml | 6 ++++++ roles/docker/tasks/main.yml | 4 ++++ 4 files changed, 21 insertions(+) create mode 100644 roles/docker/files/daemon.json create mode 100644 roles/docker/tasks/config.yml diff --git a/roles/docker/files/daemon.json b/roles/docker/files/daemon.json new file mode 100644 index 0000000..9faa846 --- /dev/null +++ b/roles/docker/files/daemon.json @@ -0,0 +1,6 @@ +{ + "dns": [ + "46.182.19.48", + "74.82.42.42" + ] +} diff --git a/roles/docker/handlers/main.yml b/roles/docker/handlers/main.yml index 72b1e42..c862e7d 100644 --- a/roles/docker/handlers/main.yml +++ b/roles/docker/handlers/main.yml @@ -1,3 +1,8 @@ --- - name: update-grub shell: update-grub + +- name: restart-docker + systemd: + name: docker + state: restarted diff --git a/roles/docker/tasks/config.yml b/roles/docker/tasks/config.yml new file mode 100644 index 0000000..bc8fddc --- /dev/null +++ b/roles/docker/tasks/config.yml @@ -0,0 +1,6 @@ +--- +- name: add docker configuration + copy: + dest: /etc/docker/daemon.json + src: daemon.json + notify: restart-docker diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml index 380a370..f69a07a 100644 --- a/roles/docker/tasks/main.yml +++ b/roles/docker/tasks/main.yml @@ -6,3 +6,7 @@ - import_tasks: kernel.yml tags: - docker:kernel + +- import_tasks: config.yml + tags: + - docker:config