mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Try to get SDB profile from pillar (#36934)
* If sdb profile is not set in conf, try the pillar * Carefully get sdb pillar in case this is the salt-master * use current method of getting sdb profile name
This commit is contained in:
parent
7d9fdfd0fe
commit
046aa22409
1 changed files with 6 additions and 0 deletions
|
@ -28,6 +28,8 @@ def sdb_get(uri, opts):
|
|||
return uri
|
||||
|
||||
profile = opts.get(uri[sdlen:indx], {})
|
||||
if not profile:
|
||||
profile = opts.get('pillar', {}).get(uri[sdlen:indx], {})
|
||||
if 'driver' not in profile:
|
||||
return uri
|
||||
|
||||
|
@ -57,6 +59,8 @@ def sdb_set(uri, value, opts):
|
|||
return False
|
||||
|
||||
profile = opts.get(uri[sdlen:indx], {})
|
||||
if not profile:
|
||||
profile = opts.get('pillar', {}).get(uri[sdlen:indx], {})
|
||||
if 'driver' not in profile:
|
||||
return False
|
||||
|
||||
|
@ -86,6 +90,8 @@ def sdb_delete(uri, opts):
|
|||
return False
|
||||
|
||||
profile = opts.get(uri[sdlen:indx], {})
|
||||
if not profile:
|
||||
profile = opts.get('pillar', {}).get(uri[sdlen:indx], {})
|
||||
if 'driver' not in profile:
|
||||
return False
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue