This repository has been archived on 2025-02-14. You can view files and clone it, but cannot push or open issues or pull requests.
pyinfra-lxd/setup-backup.py
2021-01-31 20:04:51 +09:00

20 lines
385 B
Python

from pyinfra import host
from pyinfra.operations import server, files, systemd, apt
SUDO = True
apt.packages(
name='Install packages',
packages=['borgbackup', 'borgmatic'],
update=True,
)
files.template(
name='Push borgmatic config',
src='templates/borgmatic.yaml.j2',
dest='/etc/borgmatic/config.yaml',
mode='600',
user='root',
group='root',
)