mirror of
https://gitea.0xace.cc/ansible-galaxy/wal-g.git
synced 2024-11-25 07:57:25 +00:00
57 lines
1.7 KiB
YAML
57 lines
1.7 KiB
YAML
---
|
|
- 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 }}"
|
|
|
|
- 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
|