pchanges to changes

named parameters
This commit is contained in:
Thomas Lemarchand 2018-11-07 14:14:14 +01:00 committed by Gareth J. Greenaway
parent 16525e4312
commit 05852d0865
No known key found for this signature in database
GPG key ID: 10B62F8A7CAD7A41
2 changed files with 2 additions and 3 deletions

View file

@ -28,7 +28,7 @@ def __virtual__():
if not salt.utils.platform.is_windows():
return False, 'Only available on Windows systems'
powershell_info = __salt__['cmd.shell_info']('powershell', True)
powershell_info = __salt__['cmd.shell_info'](shell='powershell', list_modules=True)
if not powershell_info['installed']:
return False, 'PowerShell not available'

View file

@ -47,7 +47,6 @@ def installed(name, source):
'changes': {},
'result': False,
'comment': '',
'pchanges': {},
}
# Start with basic error-checking. Do all the passed parameters make sense
@ -68,7 +67,7 @@ def installed(name, source):
# in ``test=true`` mode.
if __opts__['test'] is True:
ret['comment'] = 'The KB "{0}" will be installed.'.format(name)
ret['pchanges'] = {
ret['changes'] = {
'old': current_state,
'new': True,
}