# deploy windows server playbook

**URL:** <https://forum.ansible.com/t/deploy-windows-server-playbook/34859>\
**Category:** Ansible Project\
**Tags:** windows, vmware\
**Created:** [March 25, 2021, 7:35pm UTC](https://forum.ansible.com/t/deploy-windows-server-playbook/34859 "2021-03-25T19:35:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rene\_Paquin](https://avatars.discourse-cdn.com/v4/letter/r/e9a140/32.png) [@Rene\_Paquin](https://forum.ansible.com/u/Rene_Paquin)\
**Post date:** [March 25, 2021, 7:35pm UTC](https://forum.ansible.com/t/deploy-windows-server-playbook/34859/1 "2021-03-25T19:35:40Z")

</div>

Currently on ansible version 2.10.6 with the latest vmware.commumity.vmware\_guest package and dependcies. I am trying to deploy a windows server from template using the following playbook. The issue I have is when the server powers up for the first time it stops at a blues prompt screen with the three choices of continue, troubleshoot and shutdown. Not sure how to get around this.

I also have a question in regards to the deployment. In vsphere we have a number of custumization templates that we push on to the vm after it is deployed. How can I utilize that customization with the playbook? There is the wait\_for\_customization parameter but there is no place to identify the custom template we want utilize.

Thanks.

- hosts: localhost

gather\_facts: no

vars\_files:

- group\_vars/vars

- group\_vars/vars\_sec

tasks:

- name: Clone the template

community.vmware.vmware\_guest:

hostname: vcserver01.wlu.ca

username: “{{ vcenter\_user }}”

password: “{{ vcenter\_pass }}”

validate\_certs: False

name: “{{ name }}”

template: “{{ template }}”

datacenter: “{{ datacenter\_name }}”

folder: “{{ folder }}”

cluster: “{{ cluster\_name }}”

datastore: “{{ datastore }}”

networks:

- name: “{{ network }}”

ip: “{{ ip }}”

netmask: 255.255.254.0

gateway: “{{ gw }}”

dns\_servers:

- 10.10.82.255

- 10.100.46.20

type: static

customization:

existing\_vm: yes

password: “{{ password }}”

autologon: true

autologoncount: 3

hostname: “{{ name }}”

timezone: 35

dns\_servers:

- 10.10.82.255

- 10.100.46.20

joindomain: true

domain: “{{ domain }}”

domainadmin: “{{ domainadmin }}”

domainadminpassword: “{{ bind\_password}}”

state: poweredon

wait\_for\_ip\_address: yes

wait\_for\_customization: true

wait\_for\_customization\_timeout: 300

delegate\_to: localhost

register: deploy\_vm

 ![](https://us1.discourse-cdn.com/ansible/original/2X/6/6747d3b59a02db57fd10d629377fb5c11c5f4e99.png)
