summaryrefslogtreecommitdiffstats
path: root/roles/postgresql_server/tasks
diff options
context:
space:
mode:
authorRalph Bean <rbean@redhat.com>2014-01-10 21:29:20 +0000
committerRalph Bean <rbean@redhat.com>2014-01-10 21:29:20 +0000
commit12b88b57a15d28d6ec3321f2f37f7ad878d94631 (patch)
tree78492db8586b4922031cf21a210285951c96ed08 /roles/postgresql_server/tasks
parent18100deb2136d6dd6342ad40c2630f41f82b4739 (diff)
downloadansible-12b88b57a15d28d6ec3321f2f37f7ad878d94631.tar.gz
ansible-12b88b57a15d28d6ec3321f2f37f7ad878d94631.tar.xz
ansible-12b88b57a15d28d6ec3321f2f37f7ad878d94631.zip
Cron backups for db-datanommer01.
Diffstat (limited to 'roles/postgresql_server/tasks')
-rw-r--r--roles/postgresql_server/tasks/main.yml13
1 files changed, 13 insertions, 0 deletions
diff --git a/roles/postgresql_server/tasks/main.yml b/roles/postgresql_server/tasks/main.yml
index 6b4e4c3ae..b459e7915 100644
--- a/roles/postgresql_server/tasks/main.yml
+++ b/roles/postgresql_server/tasks/main.yml
@@ -32,3 +32,16 @@
- restart postgresql
tags:
- config
+
+- name: Ensure postgres has a place to backup to
+ file: dest=/backups state=directory owner=postgres
+
+- name: Set up some cronjobs to backup databases as configured
+ template: >
+ src=cron-backup-database
+ dest=/etc/cron.d/cron-backup-database-{{ item }}
+ with_items:
+ - "{{ dbs_to_backup }}"
+ when: dbs_to_backup != []
+ tags:
+ - cron