Hello Below is my playbook for the vm creation with template which is windows server 2019
I saw notes for the module wrt sysprep in : https://docs.ansible.com/ansible/latest/collections/community/vmware/vmware_guest_module.html " Uses SysPrep for Windows VM (depends on ‘guest_id’ parameter match ‘win’) with PyVmomi." But nothing in https://docs.ansible.com/ansible/latest/collections/community/vmware/vmware_guest_module.html So anyone can comment : What happens if the template sysprep is done ? What happens if the template sysprep NOT done ? Playbook : --- - hosts: localhost gather_facts: false connection: local vars_files: - ./vars/vars.yml tasks: - name: create vm using template vmware_guest: hostname: "{{ vcenter_server }}" username: "{{ vcenter_user }}" password: "{{ vcenter_pass }}" datacenter: "{{ vcenter_datacenter }}" cluster: "{{ vcenter_cluster }}" template: "{{ vcenter_template }}" validate_certs: no name: "{{ item }}" folder: /xxxx state: poweredon wait_for_ip_address: yes wait_for_customization: yes disk: - size_gb: 500 type: thin datastore: xxx hardware: memory_mb: 16384 num_cpus: 4 num_cpu_cores_per_socket: 4 scsi: paravirtual networks: - name: xxx start_connected: true customization: domain: "{{ joindomain_name }}" dns_servers: - x - x dns_suffix: - x joindomain: "{{ joindomain_name }}" autologon: false domainadmin: "{{domainadmin_name}}" domainadminpassword: "{{domainadminpassword_password}}" fullname: xx orgname: xx timezone: 33 hostname: "{{ item }}" with_items: "{{ servers }}" Thanks -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/fe9896d0-66df-4289-a60c-2e7799dc26d5n%40googlegroups.com.
