mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
The sudo_password is actually found in kwargs
This commit is contained in:
parent
3ffeb256ee
commit
573753386c
@ -969,7 +969,10 @@ def root_cmd(command, tty, sudo, **kwargs):
|
||||
'''
|
||||
if sudo:
|
||||
if 'sudo_password' in kwargs and kwargs['sudo_password'] is not None:
|
||||
command = 'echo "{1}" | sudo -S {0}'.format(command, sudo_password)
|
||||
command = 'echo "{1}" | sudo -S {0}'.format(
|
||||
command,
|
||||
kwargs['sudo_password'],
|
||||
)
|
||||
else:
|
||||
command = 'sudo {0}'.format(command)
|
||||
log.debug('Using sudo to run command {0}'.format(command))
|
||||
|
Loading…
Reference in New Issue
Block a user