From b8d95efb9cdd50c76eb6b5445e37284b919e9572 Mon Sep 17 00:00:00 2001 From: nd Date: Tue, 13 Nov 2018 08:04:08 +0100 Subject: [PATCH] add cronjob to vacuum dbs --- tasks/main.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tasks/main.yml b/tasks/main.yml index 765b997..448a217 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -31,5 +31,13 @@ become: true with_dict: "{{ postgresql.users }}" +- name: add vacuum cronjob + cron: + name: db maintenance + job: "/usr/bin/vacuumdb --all --analyze > /dev/null" + user: postgres + hour: 23 + minute: 26 + - name: flush handlers so postgres is ready before other roles try to use it meta: flush_handlers