In this blog post, I will show you how to install Windows Server (2019 and 2016) using Ansible for Windows with a playbook.
Ansible for Windows series
In the manage Windows with Ansible series, I showed you how to get started with Ansible and manage Windows machines using Playbooks and inventories.
The following Ansible playbook will install Windows Deployment Services (WDS) and will restart the server if needed.
--- - name: "Work With Active Directory Machines" hosts: windows tasks: - name: "Install Windows Deployment Services" win_feature: name: - WDS - WDS-Deployment - WDS-Transport state: present register: win_feature - name: "Reboot server if needed" win_reboot: when: win_feature.reboot_required
Success! You're on the list.
Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.