This is the ansible playbook to create a vmware node from a template, (centos 6.7).
===============================================================================
- hosts: 127.0.0.1
connection: local
user: root
sudo: false
gather_facts: false
serial: 1
tasks:
- vsphere_guest:
vcenter_hostname: cloud.qalabs.symantec.com
username: xxxxxxxx
from_template: yes
template_src: cent67-8g4c250-tmpl
resource_pool: "/Resources"
cluster: Dell R710 Cluster - Row 230 - Shared Hardware
password: "xxxxxxxx"
guest: '{{ fqdn }}'
vm_extra_config:
folder: "MSS VMs"
vm_nic:
nic1:
type: vmxnet3
network: VLAN_828_MSS_CM
network_type: dvs
vm_hardware:
osid: centos64Guest
num_cpus: 1
scsi: paravirtual
esxi:
datacenter: 'Multiple Teams - Shared Hardware'
hostname: cclab-r230-esx-01.qalabs.symantec.com