Commit 041df1ea authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Only configure postgres snapshots with rsnapshot

parent b2ce138a
Pipeline #3260 passed with stage
in 28 seconds
...@@ -36,23 +36,26 @@ ...@@ -36,23 +36,26 @@
state: started state: started
enabled: true enabled: true
- name: ensure we have our postgres backup script - name: configure snapshots
copy: when: '"servers_rsnapshot" in group_names'
src: "pgbackup{{ '-bullseye' if ansible_distribution_major_version|int(default=99) > 10 else '' }}.sh" block:
dest: /usr/local/bin/pgbackup.sh - name: ensure we have our postgres backup script
owner: root copy:
group: root src: "pgbackup{{ '-bullseye' if ansible_distribution_major_version|int(default=99) > 10 else '' }}.sh"
mode: '0755' dest: /usr/local/bin/pgbackup.sh
owner: root
group: root
mode: '0755'
- name: ensure we have our rsnapshot config - name: ensure we have our rsnapshot config
copy: copy:
src: rsnapshot.conf src: rsnapshot.conf
dest: /etc/rsnapshot.d/postgres.conf dest: /etc/rsnapshot.d/postgres.conf
owner: root owner: root
group: root group: root
mode: '0644' mode: '0644'
- name: remove obsolete crontab - name: remove obsolete crontab
file: file:
path: /etc/cron.d/postgres-snapshot path: /etc/cron.d/postgres-snapshot
state: absent state: absent
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment