Files
windows-ansible/ansible/roles/win_client/tasks/chocolatey.yml
T

135 lines
3.5 KiB
YAML

---
- name: Chocolatey
tags: client_chocolatey
block:
- name: Install Chocolatey
win_chocolatey:
name: Chocolatey
package_params: "'/Global'"
source: "{{ repo_url }}"
- name: Add new internal Choco source
win_chocolatey_source:
name: EPCC
state: present
source: "{{ repo_url }}"
# https://github.com/chocolatey/chocolatey-ansible/issues/22
#- name: Reboot after Chocolatey installation
# ansible.windows.win_reboot:
# reboot_timeout_sec: 1200
# ???
- name: Disable the default public Choco source
win_chocolatey_source:
name: chocolatey
state: disabled
when: project_zone == 'protected'
- name: Client Packages
tags: client_packages
block:
- name: Set a proxy
vars:
proxy_ip: "{{ os_project }}-{{ win_project }}-proxy"
tags: choco_proxy
win_inet_proxy:
proxy: "{{ hostvars[proxy_ip].ansible_host }}:3128"
bypass:
- <local>
when: |
inventory_hostname in groups['meta-type_client']|default([]) and
project_zone == 'protected'
- name: Install Chocolatey GUI
win_chocolatey:
name: ChocolateyGUI
state: present
package_params: "'/Global'"
allow_prerelease: true
- name: Install Microsoft office
win_chocolatey:
name: microsoft-office-deployment
state: present
package_params: "'/Product:ProPlus2021Volume /LicenseKey:FXYTK-NJJ8C-GB6DW-3DYQT-6F7TH'"
tags: install_office
- name: Install Firefox
win_chocolatey:
name: firefox
state: present
tags: install_firefox
- name: Install Google Chrome
win_chocolatey:
name: GoogleChrome
state: present
ignore_checksums: true # workaround for chrome checksum issues.
tags: install_chrome
- name: Install R
win_chocolatey:
name: R.Project
state: present
tags: install_r
- name: Install Python3.12
win_chocolatey:
name: python312
state: present
tags: install_python
- name: Install RStudio
win_chocolatey:
name: r.studio
state: present
tags: install_rstudio
- name: Install vscode
win_chocolatey:
name: vscode
state: present
tags: install_vscode
- name: Install notepadplusplus
win_chocolatey:
name: notepadplusplus
state: present
tags: install_notepadplusplus
- name: Install wiztree
win_chocolatey:
name: wiztree
state: present
tags: install_wiztree
- name: Install adobereader
win_chocolatey:
name: adobereader
state: present
tags: install_adobereader
- name: Install DotNet4.6
win_chocolatey:
name: DotNet4.6
state: present
tags: install_dotnet46
- name: Install dotnet4.7.2
win_chocolatey:
name: dotnet4.7.2
state: present
tags: install_dotnet472
- name: Create RStudio shortcut on the desktop
community.windows.win_shortcut:
src: C:\Program Files\RStudio\rstudio.exe
dest: C:\Users\Public\Desktop\RSTudio.lnk
icon: C:\Program Files\RStudio\rstudio.exe,0
- name: Create ChocolateyGUI shortcut on the desktop
community.windows.win_shortcut:
src: C:\Program Files (x86)\Chocolatey GUI\ChocolateyGui.exe
dest: C:\Users\Public\Desktop\Install Software.lnk
icon: C:\Program Files (x86)\Chocolatey GUI\ChocolateyGui.exe,0