---
- hosts: localhost
gather_facts: true
connection: local
vars_files:
- vcenter_creds.yml
- vars.yml
#no_log: True
tasks:
- name: Clone the VM template and customize
vmware_guest:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
validate_certs: False
name: ansible-vm
template: "{{ template_name }}"
datacenter: "{{ datacenter_name }}"
folder: "/{{ datacenter_name }}/vm/Ansible-test"
cluster: "{{ cluster_name }}"
datastore: "{{ datastore_name }}"
networks:
- name: VLAN-111
start_connected: yes
ip: "{{ vm_ip }}"
netmask: "{{ vm_netmask }}"
gateway: "{{ vm_gateway }}"
type: static
dns_servers: "{{ vm_dns_servers }}"
customization:
hostname: "ansible-vm"
dns_servers: "{{ vm_dns_servers }}"
state: poweredon
wait_for_ip_address: yes
delegate_to: localhost
customization_spec.
--
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 ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/b4729a2b-c090-46a2-82a8-006a1410b264n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAP7S5HYoq-fUL%3D8pbefDNNpkJ4MrQyotXbRg6GNP9ajQu97HuA%40mail.gmail.com.