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