-
-
Notifications
You must be signed in to change notification settings - Fork 441
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automate cron jobs configuration for WAL-G and minor fixes (#395)
1. If wal_g_install: true, configure cron jobs for WAl-G 2. Added a cron job to delete backups and WAL archives (older than 30 days by default) 3. Change the WAL-G config example to use with AWS S3 4. Add the ability to pass AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, WALG_S3_PREFIX variables via --extra-vars 5. Move "cron_jobs" variable to vars/system.yml 6. Add the local replication rule to pg_hba.conf for WAl-G 7. Add the path to the data directory for the wal-g backup-push command New variable "wal_g_cron_jobs"
- Loading branch information
Showing
5 changed files
with
74 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
- name: Add WAL-G cron jobs | ||
cron: | ||
cron_file: "{{ item.file | default('') }}" | ||
user: "{{ item.user | default('postgres') }}" | ||
minute: "{{ item.minute | default('*') }}" | ||
hour: "{{ item.hour | default('*') }}" | ||
day: "{{ item.day | default('*') }}" | ||
month: "{{ item.month | default('*') }}" | ||
weekday: "{{ item.weekday | default('*') }}" | ||
name: "{{ item.name }}" | ||
disabled: "{{ item.disabled | default(False) }}" | ||
state: "{{ item.state | default('present') }}" | ||
job: "{{ item.job }}" | ||
loop: "{{ wal_g_cron_jobs }}" | ||
tags: wal_g_cron |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters