W3cubDocs

/Ansible

win_chocolatey - Installs packages using chocolatey

New in version 1.9.

Synopsis

Installs packages using Chocolatey (http://chocolatey.org/). If Chocolatey is missing from the system, the module will install it. List of packages can be found at http://chocolatey.org/packages

Options

parameter required default choices comments
allow_empty_checksums
(added in 2.2)
no
Allow empty Checksums to be used
force
no
  • True
  • False
Forces install of the package (even if it already exists). Using Force will cause ansible to always report that a change was made
ignore_checksums
(added in 2.2)
no
Ignore Checksums
ignore_dependencies
(added in 2.1)
no
Ignore dependencies, only install/upgrade the package itself
install_args
(added in 2.1)
no
Arguments to pass to the native installer
name
yes
Name of the package to be installed
params
(added in 2.1)
no
Parameters to pass to the package
source
no
Specify source rather than using default chocolatey repository
state
no present
  • present
  • absent
State of the package on the system
upgrade
no
  • True
  • False
If package is already installed it, try to upgrade to the latest version or to the specified version
version
no
Specific version of the package to be installed
Ignored when state == 'absent'

Examples

# Install git
win_chocolatey:
  name: git

# Install notepadplusplus version 6.6
win_chocolatey:
  name: notepadplusplus.install
  version: 6.6

# Uninstall git
win_chocolatey:
  name: git
  state: absent

# Install git from specified repository
win_chocolatey:
  name: git
  source: https://someserver/api/v2/

This is an Extras Module

For more information on what this means please read Extras Modules

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, developing_test_pr and Developing Modules.

© 2012–2016 Michael DeHaan
© 2016 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/win_chocolatey_module.html