๐Ÿ“— Ansible playbooks and roles for building an idempotent, interconnected and scalable infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible-playbooks/roles/workstation/tasks/win_chocolatey.yml

43 lines
1.1 KiB

2 years ago
- name: ensure chocolatey is installed
chocolatey.chocolatey.win_chocolatey:
name: chocolatey
state: latest
source: https://community.chocolatey.org/api/v2/
ignore_errors: yes
- name: set chocolatey config
chocolatey.chocolatey.win_chocolatey_config:
name: "{{ item.name }}"
value: "{{ item.value }}"
loop:
- name: cacheLocation
value: "{{ ansible_env.ALLUSERSPROFILE }}\\choco-cache"
- name: commandExecutionTimeoutSeconds
value: 14400
- name: set chocolatey features
chocolatey.chocolatey.win_chocolatey_feature:
name: "{{ item.name }}"
state: "{{ item.state }}"
loop:
- name: allowGlobalConfirmation
state: enabled
- name: allowEmptyChecksumsSecure
state: disabled
- name: remove default source
chocolatey.chocolatey.win_chocolatey_source:
name: chocolatey
state: absent
- name: add custom source
chocolatey.chocolatey.win_chocolatey_source:
name: internal
priority: 1
source: '\\{{ services.smb.hostname }}.{{ services.smb.tld | d(int_tld) }}\soft'
state: present
when: services.smb is mapping