mirror of
https://github.com/roles-ansible/ansible_role_restic/
synced 2024-11-15 16:10:19 +01:00
e0f3f5c87c
improves the handling and differentiation of cronjobs and systemd timers. Rename the ``restic_create_cron`` variable to``restic_create_schedule``. Now new: ``restic_schedule_type: "systemd"``. RESOLVE #22
35 lines
1.2 KiB
YAML
35 lines
1.2 KiB
YAML
---
|
|
- name: add OS specific variables
|
|
ansible.builtin.include_vars: "{{ lookup('first_found', restic_os_variables) }}"
|
|
|
|
- name: perform versionscheck
|
|
ansible.builtin.include_tasks: 'versioncheck.yml'
|
|
when: submodules_versioncheck|bool
|
|
|
|
- name: make sure restic is available
|
|
ansible.builtin.include_tasks: 'preperation.yml'
|
|
|
|
- name: Install restic
|
|
ansible.builtin.include_tasks: 'install.yml'
|
|
when: not restic_executable.stat.exists or not restic_installed.stat.exists
|
|
|
|
- name: Configure restic
|
|
ansible.builtin.include_tasks: 'configure.yml'
|
|
|
|
- name: create backup script
|
|
ansible.builtin.include_tasks: 'backup.yml'
|
|
loop_control:
|
|
loop_var: loop_distribution
|
|
vars:
|
|
distribution: '{{ ansible_distribution }}'
|
|
distribution_version: '{{ ansible_distribution_version }}'
|
|
distribution_major_version: '{{ ansible_distribution_major_version }}'
|
|
|
|
- name: schedule restic backup
|
|
ansible.builtin.include_tasks: 'schedule.yml'
|
|
loop_control:
|
|
loop_var: loop_distribution
|
|
vars:
|
|
distribution: '{{ ansible_distribution }}'
|
|
distribution_version: '{{ ansible_distribution_version }}'
|
|
distribution_major_version: '{{ ansible_distribution_major_version }}'
|