Created
December 22, 2016 17:13
-
-
Save neilhwatson/6c659c2300717bcd4a1c35f2793e249a to your computer and use it in GitHub Desktop.
Revisions
-
neilhwatson created this gist
Dec 22, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ - name: Create VM from template vmware_guest: validate_certs: False hostname: "{{ vcenter_hostname }}" username: "{{ vcenter_user }}" password: "{{ vcenter_pass }}" #esxi_hostname: "{{ esxhost }}" #datacenter: BOX name: "{{ name }}" template: "{{ vmtemplate }}" disk: - size_gb: 20 type: thin datastore: "{{ datastore }}" nic: - type: vmxnet3 network: "{{ network }}" hardware: memory_mb: "{{ vm_memory | default(1024) }}" wait_for_ip_address: True state: present register: newvm - name: IP address info debug: msg: "{{ newvm.instance.ipv4 }} {{ name }}"