Add new var to list, change to runas_password

This commit is contained in:
twangboy 2017-07-27 18:01:26 -06:00
parent b9c91eba60
commit 41f0f75a06
2 changed files with 3 additions and 2 deletions

View file

@ -295,7 +295,7 @@ def _run(cmd,
runas = __context__.get('runas')
if password is None and '__context__' in globals():
password = __context__.get('runas_passwd')
password = __context__.get('runas_password')
# Set the default working directory to the home directory of the user
# salt-minion is running as. Defaults to home directory of user under which

View file

@ -97,6 +97,7 @@ STATE_RUNTIME_KEYWORDS = frozenset([
'reload_grains',
'reload_pillar',
'runas',
'runas_password',
'fire_event',
'saltenv',
'use',
@ -1751,7 +1752,7 @@ class State(object):
ret = {'result': False, 'name': low['name'], 'changes': {}}
self.state_con['runas'] = low.get('runas', None)
self.state_con['runas_passwd'] = low.get('runas_passwd', None)
self.state_con['runas_password'] = low.get('runas_password', None)
if not low.get('__prereq__'):
log.info(