Datanommer: enable the timescaledb extension on the DB
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
parent
5523428828
commit
bd3a1b3912
1 changed files with 23 additions and 28 deletions
|
@ -55,38 +55,33 @@
|
||||||
- timescaledb
|
- timescaledb
|
||||||
|
|
||||||
|
|
||||||
# Database users
|
- block:
|
||||||
#
|
|
||||||
- name: create the main DB user
|
|
||||||
become_user: postgres
|
|
||||||
become: true
|
become: true
|
||||||
postgresql_user:
|
become_user: postgres
|
||||||
name: "{{ datanommerDBUser }}"
|
|
||||||
password: "{{ (env == 'production')|ternary(datanommerDBPassword, datanommer_stg_db_password) }}"
|
|
||||||
tags:
|
tags:
|
||||||
- datanommer
|
- datanommer
|
||||||
- postgresql
|
- postgresql
|
||||||
|
|
||||||
- name: create the RO DB user
|
# Users
|
||||||
become_user: postgres
|
- name: create the main DB user
|
||||||
become: true
|
postgresql_user:
|
||||||
postgresql_user:
|
name: "{{ datanommerDBUser }}"
|
||||||
name: datanommer_ro
|
password: "{{ (env == 'production')|ternary(datanommerDBPassword, datanommer_stg_db_password) }}"
|
||||||
password: "{{ datanommer_ro_password }}"
|
|
||||||
tags:
|
|
||||||
- datanommer
|
|
||||||
- postgresql
|
|
||||||
|
|
||||||
|
- name: create the RO DB user
|
||||||
|
postgresql_user:
|
||||||
|
name: datanommer_ro
|
||||||
|
password: "{{ datanommer_ro_password }}"
|
||||||
|
|
||||||
# Databases
|
# Databases
|
||||||
#
|
- name: create the datanommer database
|
||||||
- name: create the datanommer database
|
postgresql_db:
|
||||||
become_user: postgres
|
name: datanommer2
|
||||||
become: true
|
owner: "{{ datanommerDBUser }}"
|
||||||
postgresql_db:
|
encoding: UTF-8
|
||||||
name: datanommer2
|
|
||||||
owner: "{{ datanommerDBUser }}"
|
# Enable timescaledb
|
||||||
encoding: UTF-8
|
- name: enable timescaledb
|
||||||
tags:
|
postgresql_ext:
|
||||||
- datanommer
|
name: timescaledb
|
||||||
- postgresql
|
db: datanommer2
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue