-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_vmware_guest.yml
More file actions
38 lines (38 loc) · 1.08 KB
/
create_vmware_guest.yml
File metadata and controls
38 lines (38 loc) · 1.08 KB
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
31
32
33
34
35
36
37
38
---
- name: Create a VM from a template
hosts: all
connection: local
gather_facts: no
tasks:
- name: CREATE_VMWARE_GUEST
vmware_guest:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
validate_certs: no
folder: /datastore1/
name: "rhel7.6_{{ vmware_guest_ip }}"
# template: template_el7
# datacenter: DC1
state: poweredon
wait_for_ip_address: yes
cdrom:
type: iso
iso_path: "/datastore1/iso/rhel/rhel-server-7.6-x86_64-dvd.iso"
# iso_path: "[datastore1] iso/rhel/rhel-server-7.6-x86_64-dvd.iso"
guest_id: rhel7_64Guest
# This is hostname of particular ESXi server on which user wants VM to be deployed
# esxi_hostname: "{{ esxi_hostname }}"
disk:
- size_gb: 50
type: thick
datastore: datastore1
hardware:
memory_mb: 2048
num_cpus: 2
scsi: paravirtual
networks:
- name: VM Network
device_type: vmxnet3
delegate_to: localhost
register: deploy_vm