deploy windows server playbook

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