From 5c3c7c469111ba5c4921a0c682db3956a48ba816 Mon Sep 17 00:00:00 2001 From: Deimos Date: Tue, 22 Oct 2019 18:15:45 -0600 Subject: [PATCH] Fix hardcoded Python version in site-packages path --- salt/salt/postgresql/init.sls | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/salt/postgresql/init.sls b/salt/salt/postgresql/init.sls index 5ecf320..b251d81 100644 --- a/salt/salt/postgresql/init.sls +++ b/salt/salt/postgresql/init.sls @@ -1,4 +1,4 @@ -{% from 'common.jinja2' import app_dir, venv_dir %} +{% from 'common.jinja2' import app_dir, python_version, venv_dir %} postgresql: pkgrepo.managed: @@ -74,7 +74,7 @@ enable-pg-stat-statements: set-postgresql-pythonpath: file.managed: - name: /etc/postgresql/{{ pillar['postgresql_version'] }}/main/environment - - contents: "PYTHONPATH='{{ venv_dir }}/lib/python3.7/site-packages:{{ app_dir }}'" + - contents: "PYTHONPATH='{{ venv_dir }}/lib/python{{ python_version }}/site-packages:{{ app_dir }}'" - user: postgres - group: postgres - mode: 644