bob/roles/restic/tasks/main.yaml
Marty Oehme 9a8c4ae81f
repo: Rename compose templates to compose.yaml.jinja
It is a short, concicse name for the compose (and one of the ways that
docker officially recommends to name the files), and jinja is the
careful recommendation of the jinja docs.

https://jinja.palletsprojects.com/en/stable/templates/#template-file-extension
2025-07-18 21:49:32 +02:00

17 lines
436 B
YAML

---
- name: Create local backup directory
ansible.builtin.file:
state: directory
path: "{{ restic_repo }}"
owner: root
group: root
mode: 0770
when: restic_repo is regex('^/.+')
- name: Deploy restic to compose
community.docker.docker_compose_v2:
project_name: restic
definition: "{{ lookup('template', 'compose.yaml.jinja') | from_yaml }}"
remove_orphans: true
wait: true
wait_timeout: 60