33 lines
1.1 KiB
YAML
33 lines
1.1 KiB
YAML
---
|
|
- name: Set common facts
|
|
ansible.builtin.import_tasks: tasks/set-default-facts.yml
|
|
|
|
- name: Deploy {{ role_name }}
|
|
block:
|
|
- name: Import prepare tasks for common service
|
|
ansible.builtin.import_tasks: tasks/prepare-common-service.yml
|
|
|
|
- name: Template the main backup script
|
|
ansible.builtin.template:
|
|
src: backup.sh.j2
|
|
dest: "{{ (service_path, 'backup.sh') | path_join }}"
|
|
mode: "0755"
|
|
|
|
- name: Create autorestic.yml
|
|
ansible.builtin.copy:
|
|
dest: "{{ (service_path, '.autorestic.yml') | path_join }}"
|
|
content: '{{ backup_yml | to_nice_yaml }}'
|
|
mode: "0644"
|
|
|
|
- name: Create autorestic.all.yml
|
|
ansible.builtin.copy:
|
|
dest: "{{ (service_path, '.autorestic.all.yml') | path_join }}"
|
|
content: '{{ backup_yml_all | to_nice_yaml }}'
|
|
mode: "0644"
|
|
|
|
- name: Import tasks specific to the hooks scripts
|
|
ansible.builtin.import_tasks: hooks.yml
|
|
- name: Import tasks specific to the recovery scripts
|
|
ansible.builtin.import_tasks: recovery.yml
|
|
- name: Import tasks specific to systemd
|
|
ansible.builtin.import_tasks: systemd.yml
|