ansible-role-borg-backup/tasks/03_configure.yml
Frank Dornheim 8b67e74440 Role restructured:
- if needed creation of a service user incl. creation of the ssh-key,
  - add the ssh key to authorized_keys,
  - auto init of the repos,
  - creation and start of systemd timer and services and
  - installation of the Docker helperscript.
2023-03-05 13:52:02 +01:00

24 lines
620 B
YAML
Executable File

---
- name: Configure borgbackup
when:
- install_backup is not defined or install_backup
tags:
- install_backup
block:
- name: Ensure /etc/borgmatic exists
ansible.builtin.file:
path: /etc/borgmatic
state: directory
mode: "0700"
owner: "{{ borgbackup_user }}"
group: "{{ borgbackup_group }}"
- name: Add Borgmatic configuration
ansible.builtin.template:
src: config.yaml.j2
dest: "/etc/borgmatic/{{ borgmatic_config_name }}"
mode: "0600"
owner: "{{ borgbackup_user }}"
group: "{{ borgbackup_group }}"
...