Playbook (highlighted in bold is what is not being adjusted)
---
- hosts: 127.0.0.1
connection: local
user: root
sudo: false
gather_facts: false
serial: 1
vars:
vcenter_hostname: uk.company.local
esxhost: 172.25.25.25
name: TEST-SERVER01
vmtemplate: winserver2012
disktype: thin
datastore: uk-datastore01
nic_type: e1000e
network: Web Servers
network_type: standard
vmcluster: UK-CLUSTER
username: username
password: password
folder: Utilities
notes: Created by Ansible
tasks:
- name: Create VM from template
vsphere_guest:
vcenter_hostname: "{{ vcenter_hostname }}"
username: "{{ username }}"
password: "{{ password }}"
guest: "{{ name }}"
vm_extra_config:
notes: "{{ notes }}"
folder: "{{ folder }}"
from_template: yes
template_src: "{{ vmtemplate }}"
cluster: "{{ vmcluster }}"
vm_disk:
disk1:
type: "{{ disktype }}"
datastore: "{{ datastore }}"
vm_nic:
nic1:
type: "{{ nic_type }}"
network: "{{ network }}"
network_type: "{{ network_type }}"
resource_pool: "/Resources"
esxi:
datacenter: UK
hostname: "{{ esxhost }}"
--
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 post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/11a7d853-6e8e-44b5-a3b3-10f88a3b7de3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.