ansible.builtin.win_chocolatey_config (v2.9.27) — module

Manages Chocolatey config settings

| "added in version" 2.7 of ansible.builtin"

Authors: Jordan Borean (@jborean93)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.9.27

Description

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

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Set the cache location
  win_chocolatey_config:
    name: cacheLocation
    state: present
    value: D:\chocolatey_temp
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Unset the cache location
  win_chocolatey_config:
    name: cacheLocation
    state: absent

Inputs

    
name:
    description:
    - The name of the config setting to manage.
    - See U(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.
    required: true
    type: str

state:
    choices:
    - absent
    - present
    default: present
    description:
    - When C(absent), it will ensure the setting is unset or blank.
    - When C(present), it will ensure the setting is set to the value of I(value).
    type: str

value:
    description:
    - Used when C(state=present) that contains the value to set for the config setting.
    - Cannot be null or an empty string, use C(state=absent) to unset a config value instead.
    type: str

See also