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 @@
state: started
enabled: true
- name: ensure we have our postgres backup script
copy:
src: "pgbackup{{ '-bullseye' if ansible_distribution_major_version|int(default=99) > 10 else '' }}.sh"
dest: /usr/local/bin/pgbackup.sh
owner: root
group: root
mode: '0755'
- name: configure snapshots
when: '"servers_rsnapshot" in group_names'
block:
- name: ensure we have our postgres backup script
copy:
src: "pgbackup{{ '-bullseye' if ansible_distribution_major_version|int(default=99) > 10 else '' }}.sh"
dest: /usr/local/bin/pgbackup.sh
owner: root
group: root
mode: '0755'
- name: ensure we have our rsnapshot config
copy:
src: rsnapshot.conf
dest: /etc/rsnapshot.d/postgres.conf
owner: root
group: root
mode: '0644'
- name: ensure we have our rsnapshot config
copy:
src: rsnapshot.conf
dest: /etc/rsnapshot.d/postgres.conf
owner: root
group: root
mode: '0644'
- name: remove obsolete crontab
file:
path: /etc/cron.d/postgres-snapshot
state: absent
- name: remove obsolete crontab
file:
path: /etc/cron.d/postgres-snapshot
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