wal-g/tasks/main.yml

57 lines
1.7 KiB
YAML
Raw Normal View History

2023-02-07 23:18:19 +00:00
---
2023-02-20 09:44:18 +00:00
- name: Load a variable file based on the OS type
include_vars: "{{ lookup('first_found', params) }}"
vars:
params:
files:
- "{{ ansible_facts['distribution'] }}.yaml"
- "{{ ansible_facts['os_family'] }}.yaml"
paths:
- "vars"
tags: wal_g_vars
- name: Set facts about needed vars
set_fact:
wal_g_pg_home_dir: "{{ wal_g_pg_home_dir }}"
wal_g_pg_data_dir: "{{ wal_g_pg_data_dir }}"
2023-02-07 23:18:19 +00:00
- name: "Include install WAL-G {{ wal_g_version }} for PostgreSQL"
include_tasks: pg.yaml
when: wal_g_pg
- name: "Include backup job with WAL-G {{ wal_g_version }} for PostgreSQL"
include_tasks: backup_job.yaml
when:
- wal_g_pg
- name: "Include backup job timer with WAL-G {{ wal_g_version }} for PostgreSQL"
include_tasks: backup_job_timer.yaml
when:
- wal_g_pg
- wal_g_backup_schedule is defined
- wal_g_backup_schedule | length > 0
- name: "Include backup retention job with WAL-G {{ wal_g_version }} for PostgreSQL"
include_tasks: backup_retention_job.yaml
when:
- wal_g_pg
- name: "Include backup retention job timer with WAL-G {{ wal_g_version }} for PostgreSQL"
include_tasks: backup_retention_job_timer.yaml
when:
- wal_g_pg
- wal_g_backup_retention_schedule is defined
- wal_g_backup_retention_schedule | length > 0
- name: "Include permanent backup job with WAL-G {{ wal_g_version }} for PostgreSQL"
include_tasks: backup_permanent_job.yaml
when:
- wal_g_pg
- name: "Include permanent backup job timer with WAL-G {{ wal_g_version }} for PostgreSQL"
include_tasks: backup_permanent_job_timer.yaml
when:
- wal_g_pg
- wal_g_backup_permanent_schedule is defined
- wal_g_backup_permanent_schedule | length > 0