chocolatey.chocolatey.win_chocolatey_config module – Manages Chocolatey config settings

Note

This module is part of the chocolatey.chocolatey collection (version 1.5.3).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install chocolatey.chocolatey.

To use it in a playbook, specify: chocolatey.chocolatey.win_chocolatey_config.

New in chocolatey.chocolatey 0.2.7

Synopsis

  • Used to manage Chocolatey config settings as well as unset the values.

Parameters

Parameter

Comments

name

string / required

The name of the config setting to manage.

See https://chocolatey.org/docs/chocolatey-configuration for a list of valid configuration settings that can be changed.

Any config values that contain encrypted values like a password are not idempotent as the plaintext value cannot be read.

state

string

When absent, it will ensure the setting is unset or blank.

When present, it will ensure the setting is set to the value of value.

Choices:

  • "absent"

  • "present" ← (default)

value

string

Used when state=present that contains the value to set for the config setting.

Cannot be null or an empty string, use state=absent to unset a config value instead.

See Also

See also

chocolatey.chocolatey.win_chocolatey

Manage packages using chocolatey.

chocolatey.chocolatey.win_chocolatey_facts

Create a facts collection for Chocolatey.

chocolatey.chocolatey.win_chocolatey_feature

Manages Chocolatey features.

chocolatey.chocolatey.win_chocolatey_source

Manages Chocolatey sources.

Examples

- name: Set the cache location
  win_chocolatey_config:
    name: cacheLocation
    state: present
    value: D:\chocolatey_temp

- name: Unset the cache location
  win_chocolatey_config:
    name: cacheLocation
    state: absent

Authors

  • Jordan Borean (@jborean93)

  • Rain Sallow (@vexx32)

  • Josh King (@windos)