Files
configpolicy/hosts
Dustin C. Hatch 0f4dea9007 restic: Add role+playbook for Restic backups
The `restic.yml` playbook applies the _restic_ role to hosts in the
_restic_ group.  The _restic_ role installs `restic` and creates a
systemd timer and service unit to run `restic backup` every day.

Restic doesn't really have a configuration file; all its settings are
controlled either by environment variables or command-line options. Some
options, such as the list of files to include in or exclude from
backups, take paths to files containing the values.  We can make use of
these to provide some configurability via Ansible variables.  The
`restic_env` variable is a map of environment variables and values to
set for `restic`.  The `restic_include` and `restic_exclude` variables
are lists of paths/patterns to include and exclude, respectively.
Finally, the `restic_password` variable contains the password to decrypt
the repository contents.  The password is written to a file and exposed
to the _restic-backup.service_ unit using [systemd credentials][0].

When using S3 or a compatible service for respository storage, Restic of
course needs authentication credentials.  These can be set using the
`restic_aws_credentials` variable.  If this variable is defined, it
should be a map containing the`aws_access_key_id` and
`aws_secret_access_key` keys, which will be written to an AWS shared
credentials file.  This file is then exposed to the
_restic-backup.service_ unit using [systemd credentials][0].

[0]: https://systemd.io/CREDENTIALS/
2024-09-04 09:40:29 -05:00

198 lines
2.5 KiB
INI

[all:vars]
ansible_python_interpreter=/usr/bin/python3
[aria2]
file0.pyrocufflink.blue
[bitwarden_rs]
bw0.pyrocufflink.blue
[btop]
chromie.pyrocufflink.blue
[burp-client]
bw0.pyrocufflink.blue
cloud0.pyrocufflink.blue
file0.pyrocufflink.blue
git0.pyrocufflink.blue
matrix0.pyrocufflink.blue
[burp-server]
burp1.pyrocufflink.blue
[certbot]
[collectd]
[collectd:children]
pyrocufflink
[collectd-prometheus:children]
collectd
[collectd-sensors:children]
vm-hosts
[collectd-sensors]
chromie.pyrocufflink.blue
nvr2.pyrocufflink.blue
[dch-proxy]
haproxy0.pyrocufflink.blue
[dch-vpn]
[dhcpcd:children]
vm-hosts
[dhcpd:children]
pyrocufflink-dhcp
[docker]
[docker:children]
bitwarden_rs
[file-servers]
file0.pyrocufflink.blue
[frigate:children]
frigate-prod
frigate-test
[frigate-prod]
nvr2.pyrocufflink.blue
[frigate-test]
[gitea]
git0.pyrocufflink.blue
[graylog]
[hassdb]
[home-assistant]
[jellyfin]
file0.pyrocufflink.blue
[jenkins-slave]
[journal2ntfy:children]
burp-server
[k8s-controller]
k8s-ctrl0.pyrocufflink.blue
[k8s-node]
[kubelet:children]
k8s-controller
k8s-node
[minio-backups]
chromie.pyrocufflink.blue
[minio:children]
burp-server
minio-backups
[motioneye]
[nfs-client:children]
k8s-node
[needproxy]
nvr2.pyrocufflink.blue
[networkd]
vmhost0.pyrocufflink.blue
vmhost1.pyrocufflink.blue
[nextcloud]
cloud0.pyrocufflink.blue
[nextcloud-db]
db0.pyrocufflink.blue
[ntpd]
[nut-monitor:children]
vm-hosts
[nut-monitor]
burp1.pyrocufflink.blue
chromie.pyrocufflink.blue
nvr2.pyrocufflink.blue
[postgresql]
db0.pyrocufflink.blue
[public-web]
web0.pyrocufflink.blue
[pxe]
pxe0.pyrocufflink.blue
[pyrocufflink]
burp1.pyrocufflink.blue
bw0.pyrocufflink.blue
chromie.pyrocufflink.blue
cloud0.pyrocufflink.blue
db0.pyrocufflink.blue
dc-grumbly.pyrocufflink.blue
dc-headphone.pyrocufflink.blue
file0.pyrocufflink.blue
git0.pyrocufflink.blue
haproxy0.pyrocufflink.blue
k8s-ctrl0.pyrocufflink.blue
matrix0.pyrocufflink.blue
nvr2.pyrocufflink.blue
pxe0.pyrocufflink.blue
smtp1.pyrocufflink.blue
vmhost0.pyrocufflink.blue
vmhost1.pyrocufflink.blue
web0.pyrocufflink.blue
[pyrocufflink-dhcp]
[radius:children]
samba-dc
[repohost]
file0.pyrocufflink.blue
[restic]
[rw-root]
[samba-dc]
dc-grumbly.pyrocufflink.blue
dc-headphone.pyrocufflink.blue
[smtp-relay]
smtp1.pyrocufflink.blue
[squid]
[synapse]
matrix0.pyrocufflink.blue
[unifi]
[vm-hosts]
vmhost0.pyrocufflink.blue
vmhost1.pyrocufflink.blue
[wheelhost]
file0.pyrocufflink.blue
[zezere]
[zigbee2mqtt:children]
home-assistant
[zwavejs2mqtt:children]
home-assistant