Files
ansible-borgmatic/tasks/install.yaml
2024-07-13 14:33:53 +01:00

31 lines
697 B
YAML

---
- name: Install BorgBackup
ansible.builtin.package:
name: borgbackup
state: present
- name: Install Borgmatic (Pip)
ansible.builtin.pip:
name: borgmatic
when:
- borgmatic_install_from_pip | default(false)
- name: Install Borgmatic (Package)
ansible.builtin.package:
name: borgmatic
when:
- borgmatic_install_from_package | default(false)
- name: Add borgmatic systemd units
ansible.builtin.copy:
src: "systemd/{{ item }}"
dest: "/etc/systemd/system/{{ item }}"
owner: root
group: root
mode: "0644"
notify: reload systemd
loop:
- borgmatic.service
- borgmatic.timer
when:
- borgmatic_install_from_pip | default(false)