mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix win_servermanager state
This commit is contained in:
parent
b26cb76abb
commit
12d530f8f0
1 changed files with 3 additions and 3 deletions
|
@ -65,14 +65,14 @@ def installed(name, recurse=False, force=False):
|
|||
ret['changes'] = {'feature': __salt__['win_servermanager.install'](name, recurse)}
|
||||
|
||||
if 'Success' in ret['changes']['feature']:
|
||||
ret['result'] = ret['changes']['feature']['Success'] == 'True'
|
||||
ret['result'] = ret['changes']['feature']['Success']
|
||||
if not ret['result']:
|
||||
ret['comment'] = 'Failed to install {0}: {1}'.format(name, ret['changes']['feature']['ExitCode'])
|
||||
else:
|
||||
ret['comment'] = 'Installed {0}'.format(name)
|
||||
else:
|
||||
ret['result'] = False
|
||||
ret['comment'] = 'Failed to install {0}.\nError Message:\n{1}'.format(name, ret['changes']['feature']['message'])
|
||||
ret['comment'] = 'Failed to install {0}.\nError Message:\n{1}'.format(name, ret['changes']['feature'])
|
||||
ret['changes'] = {}
|
||||
|
||||
return ret
|
||||
|
@ -119,7 +119,7 @@ def removed(name):
|
|||
|
||||
# Remove the features
|
||||
ret['changes'] = {'feature': __salt__['win_servermanager.remove'](name)}
|
||||
ret['result'] = ret['changes']['feature']['Success'] == 'True'
|
||||
ret['result'] = ret['changes']['feature']['Success']
|
||||
if not ret['result']:
|
||||
ret['comment'] = 'Failed to uninstall the feature {0}'.format(ret['changes']['feature']['ExitCode'])
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue