---
- name: configuring Chocolatey
  hosts: windows

  vars:
    config_item: cacheLocation
    state: present
    value: C:\chocolatey_temp2

  collections:
    - chocolatey.chocolatey
  tasks:

    - name: set configuration parameter
      win_chocolatey_config:
        name: "{{ config_item }}"
        state: "{{ state }}"
        value: "{{ value }}"