34 lines
886 B
YAML
34 lines
886 B
YAML
---
|
|
|
|
## TEMP
|
|
- name: Remove borg
|
|
ansible.builtin.include_tasks: remove_borg.yml
|
|
|
|
- name: Install restic
|
|
ansible.builtin.include_tasks: install.yml
|
|
|
|
- name: Put backup script
|
|
ansible.builtin.template:
|
|
src: resticbackup.sh.j2
|
|
dest: "{{ restic_script_path }}"
|
|
owner: root
|
|
group: "{{ restic_exe_group }}"
|
|
mode: '0750'
|
|
|
|
- name: Cron backup script
|
|
ansible.builtin.cron:
|
|
name: "restic backup script"
|
|
hour: "{{ restic_backup_hour }}"
|
|
minute: "{{ restic_backup_minute }}"
|
|
job: "{{ restic_script_path }}"
|
|
|
|
- name: Init restic
|
|
ansible.builtin.command:
|
|
cmd: "restic init && restic stats"
|
|
creates: "/root/.cache/restic"
|
|
environment:
|
|
RESTIC_REPOSITORY: "{{ restic_repository }}"
|
|
RESTIC_PASSWORD: "{{ restic_pass }}"
|
|
AWS_ACCESS_KEY_ID: "{{ restic_aws_access_key_id }}"
|
|
AWS_SECRET_ACCESS_KEY: "{{ restic_aws_secret_access_key }}"
|