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