restic
All checks were successful
ansible-lint / gitleaks (pull_request) Successful in 2s
ansible-lint / Ansible Lint (pull_request) Successful in 23s

This commit is contained in:
Michael Grote 2024-12-30 18:44:03 +01:00
parent b2ecad633b
commit f7d5f7533e

View file

@ -51,63 +51,23 @@
mode: "0600" mode: "0600"
no_log: "{{ no_debug | default('true') }}" no_log: "{{ no_debug | default('true') }}"
- name: template restic.mount - name: Ensure systemd services are templated
become: true become: true
ansible.builtin.template: ansible.builtin.template:
src: media-restic.mount.j2 src: "{{ item }}.j2"
dest: /etc/systemd/system/media-restic.mount # media-restic == /media/restic dest: /etc/systemd/system/{{ item }}
owner: root owner: root
group: root group: root
mode: "0644" mode: "0644"
notify: notify:
- systemctl daemon-reload - systemctl daemon-reload
- systemctl enable units - systemctl enable units
loop:
- name: template restic.automount - media-restic.mount # media-restic == /media/restic
become: true - media-restic.automount # media-restic == /media/restic
ansible.builtin.template: - restic.service
src: media-restic.automount.j2 - restic.timer
dest: /etc/systemd/system/media-restic.automount - restic_mail.service
owner: root
group: root
mode: "0644"
notify:
- systemctl daemon-reload
- systemctl enable units
- systemctl start units
- name: template restic.service
become: true
ansible.builtin.template:
src: restic.service.j2
dest: /etc/systemd/system/restic.service
owner: root
group: root
mode: "0644"
notify:
- systemctl daemon-reload
- name: template restic.timer
become: true
ansible.builtin.template:
src: restic.timer.j2
dest: /etc/systemd/system/restic.timer
owner: root
group: root
mode: "0644"
notify:
- systemctl daemon-reload
- name: template restic_mail.service
become: true
ansible.builtin.template:
src: "restic_mail.service.j2"
dest: /etc/systemd/system/restic_mail.service
owner: root
group: root
mode: "0644"
notify:
- systemctl daemon-reload
- name: systemctl start restic.timer - name: systemctl start restic.timer
become: true become: true