Replace yml.j2 template with copy and content
This commit is contained in:
parent
36a54fef3d
commit
4cc94969f5
12 changed files with 41 additions and 51 deletions
playbooks/roles/backup/tasks
|
@ -3,8 +3,6 @@
|
|||
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
|
||||
|
@ -15,19 +13,17 @@
|
|||
dest: "{{ (service_path, 'backup.sh') | path_join }}"
|
||||
mode: "0755"
|
||||
|
||||
- name: Template autorestic.yml
|
||||
ansible.builtin.template:
|
||||
src: yml.j2
|
||||
- name: Create autorestic.yml
|
||||
ansible.builtin.copy:
|
||||
dest: "{{ (service_path, '.autorestic.yml') | path_join }}"
|
||||
content: '{{ backup_yml | to_nice_yaml }}'
|
||||
mode: "0644"
|
||||
|
||||
- name: Template autorestic.all.yml
|
||||
ansible.builtin.template:
|
||||
src: yml.j2
|
||||
- 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"
|
||||
vars:
|
||||
yml: "{{ backup_yml_all }}"
|
||||
|
||||
- name: Import tasks specific to the hooks scripts
|
||||
ansible.builtin.import_tasks: hooks.yml
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue