salt.states.chocolatey module

Manage Chocolatey package installs .. versionadded:: 2016.3.0

salt.states.chocolatey.installed(name, version=None, source=None, force=False, pre_versions=False, install_args=None, override_args=False, force_x86=False, package_args=None, allow_multiple=False)

Installs a package if not already installed

Parameters:
  • name (str) -- The name of the package to be installed. Required.
  • version (str) -- Install a specific version of the package. Defaults to latest version. If the version is different to the one installed then the specified version will be installed. Default is None.
  • source (str) -- Chocolatey repository (directory, share or remote URL, feed). Defaults to the official Chocolatey feed. Default is None.
  • force (bool) -- Reinstall the current version of an existing package. Do not use with allow_multiple. Default is False.
  • pre_versions (bool) -- Include pre-release packages. Default is False.
  • install_args (str) -- Install arguments you want to pass to the installation process, i.e product key or feature list. Default is None.
  • override_args (bool) -- Set to True if you want to override the original install arguments (for the native installer) in the package and use your own. When this is set to False install_args will be appended to the end of the default arguments. Default is False.
  • force_x86 (bool) -- Force x86 (32bit) installation on 64 bit systems. Default is False.
  • package_args (str) -- Arguments you want to pass to the package. Default is None.
  • allow_multiple (bool) --

    Allow mulitiple versions of the package to be installed. Do not use with force. Does not work with all packages. Default is False.

    New in version 2017.7.0.

Installsomepackage:
  chocolatey.installed:
    - name: packagename
    - version: '12.04'
    - source: 'mychocolatey/source'
    - force: True
salt.states.chocolatey.uninstalled(name, version=None, uninstall_args=None, override_args=False)

Uninstalls a package

name
The name of the package to be uninstalled
version
Uninstalls a specific version of the package. Defaults to latest version installed.
uninstall_args
A list of uninstall arguments you want to pass to the uninstallation process i.e product key or feature list
override_args
Set to true if you want to override the original uninstall arguments ( for the native uninstaller)in the package and use your own. When this is set to False uninstall_args will be appended to the end of the default arguments