37 lines
		
	
	
	
		
			1.2 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
	
		
			1.2 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| ---
 | |
| - name: Set common facts
 | |
|   ansible.builtin.import_tasks: tasks/set-default-facts.yml
 | |
| 
 | |
| - name: Deploy {{ role_name }}
 | |
|   vars:
 | |
|     yml: "{{ backup_yml }}"
 | |
|   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: Template autorestic.yml
 | |
|       ansible.builtin.template:
 | |
|         src: yml.j2
 | |
|         dest: "{{ (service_path, '.autorestic.yml') | path_join }}"
 | |
|         mode: "0644"
 | |
| 
 | |
|     - name: Template autorestic.all.yml
 | |
|       ansible.builtin.template:
 | |
|         src: yml.j2
 | |
|         dest: "{{ (service_path, '.autorestic.all.yml') | path_join }}"
 | |
|         mode: "0644"
 | |
|       vars:
 | |
|         yml: "{{ backup_yml_all }}"
 | |
| 
 | |
|     - 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
 |