Deploy TimescaleDB on staging datanommer DB
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
parent
0df8c3564b
commit
76d3ead677
2 changed files with 54 additions and 0 deletions
51
roles/postgresql_server/tasks/datanommer.yml
Normal file
51
roles/postgresql_server/tasks/datanommer.yml
Normal file
|
@ -0,0 +1,51 @@
|
|||
# Use a custom module until TimescaleDB is available in EPEL
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1987790
|
||||
- name: Install the timescaledb repo
|
||||
copy:
|
||||
dest: /etc/yum.repos.d/timescaledb.repo
|
||||
content: |
|
||||
[timescaledb]
|
||||
name = Copr modules repo for timescaledb
|
||||
baseurl = https://download.copr.fedorainfracloud.org/results/abompard/timescaledb/modules/epel-8-$basearch+timescaledb-master-20210730083523/latest/$basearch
|
||||
gpgcheck=0
|
||||
gpgkey=https://download.copr.fedorainfracloud.org/results/abompard/timescaledb/pubkey.gpg
|
||||
repo_gpgcheck=0
|
||||
enabled = 1
|
||||
tags:
|
||||
- postgresql
|
||||
- timescaledb
|
||||
when: ansible_distribution_major_version|int >= 8 and ansible_distribution == 'RedHat'
|
||||
#
|
||||
- name: Install the timescaledb module
|
||||
copy:
|
||||
dest: /etc/dnf/modules.d/timescaledb.module
|
||||
content: |
|
||||
[timescaledb]
|
||||
name=timescaledb
|
||||
stream=master
|
||||
profiles=
|
||||
state=enabled
|
||||
tags:
|
||||
- postgresql
|
||||
- timescaledb
|
||||
when: ansible_distribution_major_version|int >= 8 and ansible_distribution == 'RedHat'
|
||||
|
||||
- name: Install timescaledb
|
||||
dnf:
|
||||
name:
|
||||
- timescaledb
|
||||
state: present
|
||||
tags:
|
||||
- postgresql
|
||||
- timescaledb
|
||||
|
||||
- name: Add timescaledb to postgresql config
|
||||
lineinfile:
|
||||
path: /var/lib/pgsql/data/postgresql.conf
|
||||
regexp: ^shared_preload_libraries =
|
||||
line: "shared_preload_libraries = 'timescaledb'"
|
||||
notify:
|
||||
- restart postgresql
|
||||
tags:
|
||||
- postgresql
|
||||
- timescaledb
|
|
@ -209,3 +209,6 @@
|
|||
- postgresql
|
||||
- SAR
|
||||
- GBDR
|
||||
|
||||
- include_tasks: datanommer.yml
|
||||
when: inventory_hostname.startswith('db-datanommer01') and env == "staging"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue