mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Partially revert #19912
This commit is contained in:
parent
55cb7fdab1
commit
e3b471d0e8
@ -133,7 +133,10 @@ def render(data, saltenv='base', sls='', argline='', **kwargs):
|
||||
'''
|
||||
if not HAS_GPG:
|
||||
raise SaltRenderError('GPG unavailable')
|
||||
homedir = __salt__['config.get']('gpg_keydir', DEFAULT_GPG_KEYDIR)
|
||||
if 'config.get' in __salt__:
|
||||
homedir = __salt__['config.get']('gpg_keydir', DEFAULT_GPG_KEYDIR)
|
||||
else:
|
||||
homedir = __opts__.get('gpg_keydir', DEFAULT_GPG_KEYDIR)
|
||||
log.debug('Reading GPG keys from: {0}'.format(homedir))
|
||||
gpg = gnupg.GPG(gnupghome=homedir)
|
||||
return decrypt_object(data, gpg)
|
||||
|
Loading…
Reference in New Issue
Block a user