mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Updated the bins_dir to default to pg_bin #37935
The config looking for initdb wasn't consistent with documentation so this updates that. It might be best to add a default but I need to look into the code a bit more first.
This commit is contained in:
parent
e539a94a56
commit
a96789353f
1 changed files with 13 additions and 2 deletions
|
@ -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?
|
||||
|
@ -112,7 +115,7 @@ def __virtual__():
|
|||
'''
|
||||
Only load this module if the psql and initdb bin exist
|
||||
'''
|
||||
utils = ['psql', 'initdb']
|
||||
utils = ['psql']
|
||||
if not HAS_CSV:
|
||||
return False
|
||||
for util in utils:
|
||||
|
@ -128,7 +131,15 @@ 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:
|
||||
log.warning(
|
||||
'Using postgres.bins_dir is not supported. '
|
||||
'Replace this with postgres.pg_bin')
|
||||
|
||||
util_bin = salt.utils.which(util)
|
||||
if not util_bin:
|
||||
if pg_bin_dir:
|
||||
|
|
Loading…
Add table
Reference in a new issue