mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
pip state respects upgrade, ignore_installed & force_reinstall flags
This commit is contained in:
parent
f045052602
commit
959645dd5a
@ -69,10 +69,11 @@ def installed(name,
|
||||
ret['comment'] = 'Error installing \'{0}\': {1}'.format(name, err)
|
||||
return ret
|
||||
|
||||
if name in pip_list:
|
||||
ret['result'] = True
|
||||
ret['comment'] = 'Package already installed'
|
||||
return ret
|
||||
if ignore_installed == False and name in pip_list:
|
||||
if force_reinstall == False and upgrade == False:
|
||||
ret['result'] = True
|
||||
ret['comment'] = 'Package already installed'
|
||||
return ret
|
||||
|
||||
if __opts__['test']:
|
||||
ret['result'] = None
|
||||
|
Loading…
Reference in New Issue
Block a user