diff --git a/README.md b/README.md index c8e8227..15f77dd 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,13 @@ postgres_ha_databases: ``` The `user` field is optional. DB name is used by default. +Backup settings can be adjusted using: +```yaml +postgres_ha_backup: false +postgres_ha_backup_frequency: 'weekly' +postgres_ha_backup_timeout: 1200 +``` + # Management The service is managed using [Docker Compose](https://docs.docker.com/compose/): diff --git a/defaults/main.yml b/defaults/main.yml index f291a14..3d9ea7a 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -37,6 +37,7 @@ postgres_ha_databases: [] # pass: 'dbpass' # Backups +postgres_ha_backup: true postgres_ha_backup_service_name: 'dump-{{ postgres_ha_service_name }}' postgres_ha_backup_frequency: daily postgres_ha_backup_timeout: 600 diff --git a/tasks/main.yml b/tasks/main.yml index 18b7673..9d4ecdc 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -23,4 +23,6 @@ loop_var: db - import_tasks: consul.yml + - import_tasks: backup.yml + when: postgres_ha_backup