Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
Automatically source the SCL when using CentOS
Browse files Browse the repository at this point in the history
Make sure commands like psql work correctly.

closes: #5327
https://pulp.plan.io/issues/5327
  • Loading branch information
dralley committed Sep 24, 2019
1 parent d4e1ecb commit 98c5522
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions roles/pulp-database/tasks/install_postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
state: present
when: ansible_distribution == 'CentOS'

- name: Enable PostgreSQL SCL
template:
src: templates/postgresql_scl_profile.j2
dest: "{{ postgresql_profile_path }}"
when: ansible_distribution == 'CentOS'

- name: Set listen addresses
set_fact:
postgresql_global_config_options:
Expand Down
2 changes: 2 additions & 0 deletions roles/pulp-database/templates/postgresql_scl_profile.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
source scl_source enable rh-postgresql96
1 change: 1 addition & 0 deletions roles/pulp-database/vars/CentOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ postgresql_daemon: rh-postgresql96-postgresql
postgresql_bin_path: /opt/rh/rh-postgresql96/root/bin
postgresql_data_dir: /var/opt/rh/rh-postgresql96/lib/pgsql/data
postgresql_config_path: /var/opt/rh/rh-postgresql96/lib/pgsql/data
postgresql_profile_path: /etc/profile.d/enablepostgresql96.sh

0 comments on commit 98c5522

Please sign in to comment.