Merge pull request #37946 from scott-w/37935-fix-bin-dir

Updated the bins_dir to default to pg_bin
This commit is contained in:
Mike Place 2016-11-29 09:48:27 -07:00 committed by GitHub
commit 36f91408c5

View file

@ -26,6 +26,9 @@ Module to provide Postgres compatibility to salt.
of the postgres bin's path to the relevant minion for this module::
postgres.pg_bin: '/usr/pgsql-9.5/bin/'
:note: Older versions of Salt had a bug where postgres.bins_dir was used
instead of postgres.pg_bin. You should upgrade this as soon as possible.
'''
# This pylint error is popping up where there are no colons?
@ -128,7 +131,17 @@ def _find_pg_binary(util):
Helper function to locate various psql related binaries
'''
pg_bin_dir = __salt__['config.option']('postgres.bins_dir')
pg_bin_dir = __salt__['config.option']('postgres.pg_bin')
if not pg_bin_dir: # Fallback to incorrectly-documented setting
pg_bin_dir = __salt__['config.option']('postgres.bins_dir')
if pg_bin_dir:
salt.utils.warn_until(
'Oxygen',
'Using \'postgres.bins_dir\' is not officially supported and '
'only exists as a workaround. Please replace this in your '
'configuration with \'postgres.pg_bin\'.')
util_bin = salt.utils.which(util)
if not util_bin:
if pg_bin_dir: