diff --git a/roles/docker/tasks/config.yml b/roles/docker/tasks/config.yml new file mode 100644 index 0000000..7088c3a --- /dev/null +++ b/roles/docker/tasks/config.yml @@ -0,0 +1,10 @@ +--- + +- name: Copy template conf + ansible.builtin.template: + src: "daemon.json" + dest: "/etc/docker/daemon.json" + group: root + owner: root + mode: '0600' + become: true diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml index 46e5ce0..e3db400 100644 --- a/roles/docker/tasks/main.yml +++ b/roles/docker/tasks/main.yml @@ -1,6 +1,8 @@ --- -# TODO : Copy template into /etc/docker/daemon.json +- ansible.builtin.import_tasks: config.yml + name: config + become: true - name: set mydistribution ansible.builtin.set_fact: diff --git a/roles/docker/templates/daemon.json b/roles/docker/templates/daemon.json index 432de14..3f2fedd 100644 --- a/roles/docker/templates/daemon.json +++ b/roles/docker/templates/daemon.json @@ -1,4 +1,3 @@ { "data-root": "{{ server.work_dir }}/docker" } -