create tasks for cron extension
This commit is contained in:
parent
d7b18ef1a1
commit
2886fc012f
@ -8,6 +8,14 @@
|
||||
state: latest
|
||||
update_cache: yes
|
||||
|
||||
- name: "Stop postgresql service"
|
||||
tags:
|
||||
- install
|
||||
- timescaledb_install
|
||||
systemd:
|
||||
name: postgresql
|
||||
state: stop
|
||||
|
||||
- name: "Add pg_cron to shared_preload_libraries"
|
||||
tags:
|
||||
- install
|
||||
@ -25,7 +33,7 @@
|
||||
dest: /etc/postgresql/{{ postgresql_version }}/main/postgresql.conf
|
||||
line: "cron.database_name = '{{ timescaledb_database_name }}'"
|
||||
|
||||
- name: "Define cron database name"
|
||||
- name: "Define cron timezone"
|
||||
tags:
|
||||
- install
|
||||
- timescaledb_install
|
||||
@ -47,11 +55,11 @@
|
||||
- timescaledb_install
|
||||
postgresql_query:
|
||||
db: "{{ timescaledb_database_name }}"
|
||||
login_user: "postgres"
|
||||
login_password: "{{ postgresql_admin_password }}"
|
||||
login_user: "{{ timescaledb_database_user }}"
|
||||
login_password: "{{ timescaledb_database_password }}"
|
||||
login_host: "{{ lxc_ip }}"
|
||||
query:
|
||||
- CREATE EXTENSION pg_cron;
|
||||
- GRANT USAGE ON SCHEMA cron TO {{ timescaledb_database_user }};
|
||||
|
||||
- name: "Restart postgresql service"
|
||||
tags:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user