generated from ansible/ansible_template
add better conditionals
This commit is contained in:
parent
f702241b55
commit
5302081a43
|
@ -23,7 +23,7 @@
|
||||||
mode: "751"
|
mode: "751"
|
||||||
when: restic_extract is changed
|
when: restic_extract is changed
|
||||||
|
|
||||||
- name: "Copy the backup script"
|
- name: "Copy the docker backup script"
|
||||||
blockinfile:
|
blockinfile:
|
||||||
path: "/home/ansible/backup-to-restic"
|
path: "/home/ansible/backup-to-restic"
|
||||||
mode: 0755
|
mode: 0755
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
sudo docker-compose pause
|
sudo docker-compose pause
|
||||||
sudo -E restic backup /home/ansible --exclude-file=/etc/restic/excludes.txt
|
sudo -E restic backup /home/ansible --exclude-file=/etc/restic/excludes.txt
|
||||||
sudo docker-compose unpause
|
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"
|
- name: "Copy the backup script"
|
||||||
blockinfile:
|
blockinfile:
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
export RESTIC_PASSWORD={{ restic_password }}
|
export RESTIC_PASSWORD={{ restic_password }}
|
||||||
|
|
||||||
restic backup /home/andreas --exclude-file=/etc/restic/excludes.txt
|
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"
|
- name: "Create the restic config dir"
|
||||||
file:
|
file:
|
||||||
|
|
Reference in New Issue