mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Deprecate __env__
in favor of saltenv
This commit is contained in:
parent
2869795802
commit
7601e46825
@ -134,7 +134,7 @@ def set_(package, question, type, value, *extra):
|
||||
return True
|
||||
|
||||
|
||||
def set_file(path, **kwargs):
|
||||
def set_file(path, saltenv='base', **kwargs):
|
||||
'''
|
||||
Set answers to debconf questions from a file.
|
||||
|
||||
@ -144,7 +144,15 @@ def set_file(path, **kwargs):
|
||||
|
||||
salt '*' debconf.set_file salt://pathto/pkg.selections
|
||||
'''
|
||||
path = __salt__['cp.cache_file'](path, kwargs.get('__env__', 'base'))
|
||||
if '__env__' in kwargs:
|
||||
salt.utils.warn_until(
|
||||
'Helium',
|
||||
'Passing a salt environment should be done using \'saltenv\' not '
|
||||
'\'__env__\'. This functionality will be removed in Salt Helium.'
|
||||
)
|
||||
# Backwards compatibility
|
||||
saltenv = kwargs['__env__']
|
||||
path = __salt__['cp.cache_file'](path, saltenv)
|
||||
if path:
|
||||
_set_file(path)
|
||||
return True
|
||||
|
Loading…
Reference in New Issue
Block a user