feat: add windows 11 build
This commit is contained in:
@@ -20,4 +20,6 @@
|
||||
include_tasks: suse.yml
|
||||
when: "ansible_facts['distribution'] in ['openSUSE Leap', 'Suse']"
|
||||
|
||||
...
|
||||
- name: "{{ base_task_name }}"
|
||||
ansible.builtin.include_tasks: windows.yml
|
||||
when: ansible_os_family == "Windows"
|
||||
|
||||
51
ansible/roles/base/tasks/windows.yml
Normal file
51
ansible/roles/base/tasks/windows.yml
Normal file
@@ -0,0 +1,51 @@
|
||||
---
|
||||
# Microsoft Windows specific tasks.
|
||||
|
||||
# Tasks for updating the operating system and installing additional packages.
|
||||
- name: Getting guest operating system information
|
||||
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 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
|
||||
Reference in New Issue
Block a user