Add msiexec option to the install

This commit is contained in:
David Boucha 2013-02-14 17:26:50 -07:00
parent 1d31da637a
commit 7935df0b77

View File

@ -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)