Skip to content

Commit

Permalink
Merge pull request #6278 from dimagi/gh/synclog/remove-pg-repack
Browse files Browse the repository at this point in the history
Add playbook to cleanup pg_repack on pgbouncer_a6
  • Loading branch information
gherceg authored May 28, 2024
2 parents 8fa58cc + 468ceae commit 8941421
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/commcare_cloud/ansible/cleanup_pg_repack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
- name: Cleanup pg_repack configuration
hosts: pgbouncer_a6
tasks:
- include_vars:
file: roles/postgresql_base/defaults/main.yml

- name: Check if pg_repack is installed
stat:
path: "{{ postgres_install_dir }}/bin/pg_repack"
register: pg_repack_stat

- name: Check if pg_repack cron exists
stat:
path: "/etc/cron.d/pg_repack_commcarehq_synclogs"
register: pg_repack_cron

- name: Remove pg_repack cron file
file:
path: "/etc/cron.d/pg_repack_commcarehq_synclogs"
state: absent
when: pg_repack_cron.stat.exists == True

0 comments on commit 8941421

Please sign in to comment.