diff --git a/roles/common/tasks/postgres_cron.yml b/roles/common/tasks/postgres_cron.yml index 38fab40..2139164 100644 --- a/roles/common/tasks/postgres_cron.yml +++ b/roles/common/tasks/postgres_cron.yml @@ -49,17 +49,17 @@ name: postgresql state: started -- name: "Configure pg_cron extension" +- name: "Create cron extension {{ timescaledb_database_name }}" tags: - install - timescaledb_install - postgresql_query: + postgresql_ext: + name: pg_cron db: "{{ timescaledb_database_name }}" - login_user: "{{ postgres }}" + state: present + login_user: "postgres" login_password: "{{ postgresql_admin_password }}" login_host: "{{ lxc_ip }}" - query: - - CREATE EXTENSION pg_cron; - name: "Restart postgresql service" tags: