diff --git a/roles/borg/templates/backup.j2 b/roles/borg/templates/backup.j2 index 668f9c9..1930072 100644 --- a/roles/borg/templates/backup.j2 +++ b/roles/borg/templates/backup.j2 @@ -1,2 +1,2 @@ #!/bin/sh -cd {{ server.work_dir }} && borg create --stats -C zstd,22 --progress "{{ server.backup_dir }}::$(date --iso-8601=seconds)" . \ No newline at end of file +cd {{ server.work_dir }} && borg create --stats -C zstd,22 --progress "{{ server.backup_dir }}::$(date --iso-8601=seconds)" . --exclude "{{ server.work_dir }}/docker" diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml index d56ab0d..46e5ce0 100644 --- a/roles/docker/tasks/main.yml +++ b/roles/docker/tasks/main.yml @@ -1,4 +1,7 @@ --- + +# TODO : Copy template into /etc/docker/daemon.json + - name: set mydistribution ansible.builtin.set_fact: mydistribution: "{{ ansible_distribution | lower }}" @@ -36,4 +39,4 @@ community.docker.docker_network: name: metrics state: present - become: true \ No newline at end of file + become: true diff --git a/roles/docker/templates/daemon.json b/roles/docker/templates/daemon.json new file mode 100644 index 0000000..432de14 --- /dev/null +++ b/roles/docker/templates/daemon.json @@ -0,0 +1,4 @@ +{ + "data-root": "{{ server.work_dir }}/docker" +} +