Initial commit
This commit is contained in:
33
roles/virtualization/tasks/vmware.yml
Normal file
33
roles/virtualization/tasks/vmware.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
- name: Create VM in vCenter
|
||||
delegate_to: localhost
|
||||
vmware_guest:
|
||||
hostname: "{{ hypervisor_url }}"
|
||||
username: "{{ hypervisor_username }}"
|
||||
password: "{{ hypervisor_password }}"
|
||||
validate_certs: no
|
||||
datacenter: "{{ hypervisor_cluster }}"
|
||||
cluster: "{{ hypervisor_node }}"
|
||||
folder: "{{ vm_path }}"
|
||||
name: "{{ hostname }}"
|
||||
guest_id: "otherGuest64"
|
||||
state: poweredon
|
||||
disk:
|
||||
- size_gb: "{{ vm_size }}"
|
||||
type: thin
|
||||
datastore: "{{ hypervisor_storage }}"
|
||||
hardware:
|
||||
memory_mb: "{{ vm_memory }}"
|
||||
num_cpus: "{{ vm_cpus }}"
|
||||
boot_firmware: "efi"
|
||||
secure_boot: false
|
||||
cdrom:
|
||||
- controller_number: 0
|
||||
unit_number: 0
|
||||
controller_type: "sata"
|
||||
state: present
|
||||
type: iso
|
||||
iso_path: "{{ boot_iso }}"
|
||||
networks:
|
||||
- vlan: "{{ vlan_name }}"
|
||||
type: dhcp
|
||||
ignore_errors: yes
|
||||
Reference in New Issue
Block a user