feat: streamline the chocolatey install and removed windows system updates
This commit is contained in:
@@ -6,46 +6,13 @@
|
||||
ansible.builtin.debug:
|
||||
msg: "OS: {{ ansible_os_name }}"
|
||||
|
||||
- name: Ensure .NET Framework 4.8 requirement is satisfied for Chocolatey v2.0.0 and later
|
||||
when: ansible_os_installation_type != "Server Core"
|
||||
block:
|
||||
- name: Install Chocolatey CLI
|
||||
chocolatey.chocolatey.win_chocolatey:
|
||||
name: chocolatey
|
||||
state: present
|
||||
version: 1.4.0
|
||||
- name: Install latest version of Chocolatey
|
||||
chocolatey.chocolatey.win_chocolatey:
|
||||
name: chocolatey
|
||||
state: latest
|
||||
|
||||
- name: Install Microsoft .NET Framework 4.8
|
||||
chocolatey.chocolatey.win_chocolatey:
|
||||
name: netfx-4.8
|
||||
state: present
|
||||
|
||||
- name: Reboot the host to complete .NET Framework 4.8 install
|
||||
ansible.windows.win_reboot:
|
||||
|
||||
- name: Install latest version of Chocolatey
|
||||
chocolatey.chocolatey.win_chocolatey:
|
||||
name: chocolatey
|
||||
state: latest
|
||||
|
||||
- name: Installing additional packages using Chocolatey
|
||||
chocolatey.chocolatey.win_chocolatey:
|
||||
name:
|
||||
- googlechrome
|
||||
- putty
|
||||
state: latest
|
||||
ignore_checksums: true
|
||||
|
||||
- name: Updating the operating system
|
||||
ansible.windows.win_updates:
|
||||
category_names:
|
||||
- SecurityUpdates
|
||||
- CriticalUpdates
|
||||
reject_list:
|
||||
- 5034439
|
||||
- 5034441
|
||||
reboot: true
|
||||
register: win_updates
|
||||
until: not win_updates.failed
|
||||
retries: 5
|
||||
delay: 300
|
||||
- name: Installing additional packages using Chocolatey
|
||||
chocolatey.chocolatey.win_chocolatey:
|
||||
name: "{{ item }}"
|
||||
state: latest
|
||||
loop: "{{ base_chocolatey_packages }}"
|
||||
|
||||
Reference in New Issue
Block a user