mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Add msiexec option to the install
This commit is contained in:
parent
1d31da637a
commit
7935df0b77
@ -310,7 +310,7 @@ def refresh_db():
|
||||
return True
|
||||
|
||||
|
||||
def install(name=None, refresh=False, **kwargs):
|
||||
def install(name=None, refresh=False, msiexec=False, **kwargs):
|
||||
'''
|
||||
Install the passed package
|
||||
|
||||
@ -344,6 +344,8 @@ def install(name=None, refresh=False, **kwargs):
|
||||
cached_pkg = pkginfo[version]['installer']
|
||||
cached_pkg = cached_pkg.replace('/', '\\')
|
||||
cmd = '"' + str(cached_pkg) + '"' + str(pkginfo[version]['install_flags'])
|
||||
if msiexec:
|
||||
cmd = 'msiexec /i ' + cmd
|
||||
stderr = __salt__['cmd.run_all'](cmd).get('stderr', '')
|
||||
if stderr:
|
||||
log.error(stderr)
|
||||
|
Loading…
Reference in New Issue
Block a user