Created
December 22, 2016 17:13
-
-
Save neilhwatson/6c659c2300717bcd4a1c35f2793e249a to your computer and use it in GitHub Desktop.
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 characters
- 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 }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment