mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add restart needed
This commit is contained in:
parent
72ebf26616
commit
6e478cbda0
1 changed files with 7 additions and 2 deletions
|
@ -71,11 +71,14 @@ def installed(name, recurse=False, force=False):
|
|||
ret['result'] = status['Success']
|
||||
if not ret['result']:
|
||||
ret['comment'] = 'Failed to install {0}: {1}'.format(name, ret['changes']['feature']['ExitCode'])
|
||||
|
||||
if 'already installed' not in status['DisplayName']:
|
||||
ret['changes']['feature'] = status
|
||||
|
||||
ret['changes']['restart_needed'] = status['RestartNeeded']
|
||||
|
||||
new = __salt__['win_servermanager.list_installed']()
|
||||
ret['changes'] = salt.utils.compare_dicts(old, new)
|
||||
ret['changes']['features'] = salt.utils.compare_dicts(old, new)
|
||||
|
||||
return ret
|
||||
|
||||
|
@ -127,7 +130,9 @@ def removed(name):
|
|||
if not ret['result']:
|
||||
ret['comment'] = 'Failed to uninstall the feature {0}'.format(ret['changes']['feature']['ExitCode'])
|
||||
|
||||
ret['changes']['restart_needed'] = status['RestartNeeded']
|
||||
|
||||
new = __salt__['win_servermanager.list_installed']()
|
||||
ret['changes'] = salt.utils.compare_dicts(old, new)
|
||||
ret['changes']['features'] = salt.utils.compare_dicts(old, new)
|
||||
|
||||
return ret
|
||||
|
|
Loading…
Add table
Reference in a new issue