fix template

This commit is contained in:
Tomislav Kopić 2024-02-10 12:30:43 +01:00
parent ae692c8071
commit 3631ad6c6c

View File

@ -2,7 +2,7 @@
- hosts: all
become: yes
vars:
borg_repo_path: "/var/backup/backup.borg/"
borg_repo_path: "/var/backups/backup.borg/"
borg_repo_encryption: "none"
borg_backup_paths: "/etc/ /var/spool/ --exclude=*.log"
tasks:
@ -14,10 +14,10 @@
- name: "Create backup repository"
ansible.builtin.command: borg init -e {{borg_repo_encryption}} {{borg_repo_path}}
args:
creates: {borg_repo_path}
creates: "{{borg_repo_path}}"
- name: "Configure backup script"
ansible.builtin.copy:
ansible.builtin.template:
src: ../templates/borgbackup.j2
dest: /opt/borgbackup.sh
owner: root