backup.sh: move to scripts dir

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2023-11-22 12:22:50 +01:00
parent 716732b18b
commit 8381b62304
No known key found for this signature in database
GPG Key ID: FE65CD384D5BF7B4
4 changed files with 9 additions and 7 deletions

View File

@ -2,11 +2,11 @@
- name: 'Create timer for database backup'
include_role: name=systemd-timer
vars:
systemd_timer_name: '{{ postgres_ha_backup_service_name }}'
systemd_timer_description: 'Dump High-Availability PostgreSQL database.'
systemd_timer_user: '{{ postgres_ha_backup_user }}'
systemd_timer_frequency: '{{ postgres_ha_backup_frequency }}'
systemd_timer_name: '{{ postgres_ha_backup_service_name }}'
systemd_timer_user: '{{ postgres_ha_backup_user }}'
systemd_timer_frequency: '{{ postgres_ha_backup_frequency }}'
systemd_timer_timeout_sec: '{{ postgres_ha_backup_timeout }}'
systemd_timer_script_path: '/docker/{{ postgres_ha_service_name }}/backup.sh'
systemd_timer_after_extra: 'docker.service'
systemd_timer_start_on_creation: false
systemd_timer_script_content: '{{ lookup("template", "backup.sh.j2") }}'

View File

@ -27,10 +27,12 @@
apt:
name: 'postgresql-client'
- name: Create Admin wrapper script
- name: Create wrapper scripts
template:
src: 'scripts/admin.sh.j2'
dest: '{{ postgres_ha_service_path }}/admin.sh'
src: '{{ item }}'
dest: '{{ postgres_ha_service_path }}/{{ item | basename }}'
owner: 'root'
group: 'docker'
mode: 0750
with_fileglob:
- 'templates/scripts/*.sh'