diff --git a/tasks/main.yml b/tasks/main.yml index dd3387c..186a2f0 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -23,7 +23,7 @@ mode: "751" when: restic_extract is changed -- name: "Copy the backup script" +- name: "Copy the docker backup script" blockinfile: path: "/home/ansible/backup-to-restic" mode: 0755 @@ -38,7 +38,7 @@ sudo docker-compose pause sudo -E restic backup /home/ansible --exclude-file=/etc/restic/excludes.txt sudo docker-compose unpause - when: "'docker' in group_names" + when: "'docker' in group_names and docker_skip_project is undefined" - name: "Copy the backup script" blockinfile: @@ -52,7 +52,7 @@ export RESTIC_PASSWORD={{ restic_password }} restic backup /home/andreas --exclude-file=/etc/restic/excludes.txt - when: "'docker' not in group_names" + when: docker_skip_project - name: "Create the restic config dir" file: