forked from pb82/vmware_project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvmwareCreateVM.yml
More file actions
30 lines (30 loc) · 853 Bytes
/
vmwareCreateVM.yml
File metadata and controls
30 lines (30 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
---
- name: Create a VM in VMware vCenter using VMware.vmware collection
hosts: localhost
become: false
gather_facts: false
tasks:
- name: Clone VM from template
vmware_guest:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
validate_certs: false
datacenter: "{{ vcenter_datacenter }}"
folder: ""
name: "{{ vmname }}"
template: "{{ vm_template }}"
cluster: "{{ vcenter_cluster }}"
datastore: "datastore1"
state: poweredon
hardware:
memory_mb: "4096"
num_cpus: "1"
networks:
- name: "VM Network"
type: dhcp
disk:
- size_gb: "1"
type: thin
datastore: "datastore1"
delegate_to: localhost