-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_vm.yaml
More file actions
39 lines (37 loc) · 1.04 KB
/
Copy pathcreate_vm.yaml
File metadata and controls
39 lines (37 loc) · 1.04 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
39
---
- name: Create VM in vSphere
hosts: localhost
become: false
gather_facts: false
collections:
- community.vmware
pre_tasks:
- name: Load variables
include_vars: variables.yaml
tasks:
- name: Create VM
community.vmware.vmware_guest:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
validate_certs: "{{ vcenter_validate_certs | bool }}"
datacenter: "{{ vcenter_datacenter }}"
cluster: "{{ vcenter_cluster }}"
folder: "{{ vcenter_vm_folder }}"
name: "reli"
guest_id: "rhel9_64Guest"
state: poweredon
hardware:
memory_mb: 2048
num_cpus: 1
scsi: paravirtual
disk:
- size_gb: 16
type: thin
datastore: "{{ vcenter_datastore }}"
networks:
- name: "{{ vcenter_network }}"
device_type: vmxnet3
connected: true
wait_for_ip_address: false
delegate_to: localhost