alecunsolo.borgmatic
Ansible Role: borgmatic
DISCLAIMER
After this announcement I will not test on RHEL anymore.
This role install and configure borg and borgmatic.
Requirements
It is assumed that the ssh client is installed (for generating ssh keys). EL distros should also install EPEL repository and dnf-plugins-core (needed for enabling CRB repository via dnf config-manager).
Role Variables
borgmatic_config_file: default-config.yaml.j2
The configuration template file name. The default one is a generic configuration generated with generate-borgmatic-config
borgmatic_frequency: daily
This value is used to configre the OnCalendar option of the borgmatic.timer systemd unit.
borgmatic_enable_timer: true
Whether to enable or not the timer.
Dependencies
The collections community.crypto and community.general must be installed.
Example Playbook
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: all
become: yes
tasks:
- name: Include borgmatic.
ansible.builtin.include_role:
name: alecunsolo.borgmatic
License
MIT
Notes
Testing with molecule (including the docker images used) is stolen from heavily inspired by Jeff Geerling. Watch his video (and the other ones as well).
ansible-galaxy install alecunsolo.borgmatic