mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
Merge pull request #37762 from twangboy/fix_chocolatey_state
Add pre_versions to chocolatey.installed
This commit is contained in:
commit
f7c7109152
@ -31,8 +31,9 @@ def install(*args, **kwargs):
|
||||
installed(*args, **kwargs)
|
||||
|
||||
|
||||
def installed(name, version=None, source=None, force=False, install_args=None,
|
||||
override_args=False, force_x86=False, package_args=None):
|
||||
def installed(name, version=None, source=None, force=False, pre_versions=False,
|
||||
install_args=None, override_args=False, force_x86=False,
|
||||
package_args=None):
|
||||
'''
|
||||
Installs a package if not already installed
|
||||
|
||||
@ -49,6 +50,9 @@ def installed(name, version=None, source=None, force=False, install_args=None,
|
||||
force
|
||||
Reinstall the current version of an existing package. Default is false.
|
||||
|
||||
pre_versions
|
||||
Include pre-release packages. Default is False.
|
||||
|
||||
install_args
|
||||
A list of install arguments you want to pass to the installation
|
||||
process i.e product key or feature list
|
||||
@ -97,13 +101,11 @@ def installed(name, version=None, source=None, force=False, install_args=None,
|
||||
return ret
|
||||
|
||||
# Install the package
|
||||
ret['changes'] = {name: __salt__['chocolatey.install'](name, version,
|
||||
source,
|
||||
force,
|
||||
install_args,
|
||||
override_args,
|
||||
force_x86,
|
||||
package_args)}
|
||||
ret['changes'] = {name: __salt__['chocolatey.install'](
|
||||
name=name, version=version, source=source, force=force,
|
||||
pre_versions=pre_versions, install_args=install_args,
|
||||
override_args=override_args, force_x86=force_x86,
|
||||
package_args=package_args)}
|
||||
|
||||
if 'Running chocolatey failed' not in ret['changes']:
|
||||
ret['result'] = True
|
||||
|
Loading…
Reference in New Issue
Block a user