infrastructure/playbooks/roles/backup/tasks/hooks.yml

22 lines
550 B
YAML
Raw Normal View History

2024-10-05 23:59:46 +00:00
---
- name: Set hooks path
ansible.builtin.set_fact:
hooks_path: "{{ (service_path, 'hooks') | path_join }}"
- name: Create hooks directory
ansible.builtin.file:
path: "{{ hooks_path }}"
state: directory
mode: "0755"
- name: Copy the hooks
ansible.builtin.copy:
2024-10-13 16:30:14 +00:00
src: hooks/
2024-10-05 23:59:46 +00:00
dest: "{{ hooks_path }}"
mode: "0755"
- name: Create the from directories
ansible.builtin.file:
path: "{{ ('/opt/services/_backup', item | basename) | path_join }}"
state: directory
mode: "0755"
with_fileglob:
- "hooks/*"