Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- - name: create vm in vsphere
- hosts: 127.0.0.1
- connection: local
- tasks:
- - name: load vsphere credentials
- include_vars: vsphere.yml
- - name: create vm in vsphere
- vsphere_guest:
- username: "{{vsphere.user}}"
- password: "{{vsphere.pass}}"
- vcenter_hostname: "{{ vsphere.hostname }}"
- validate_certs: no
- cluster: esx
- from_template: yes
- template_src: mytemplate
- guest: fromansible
- vm_disk:
- disk1:
- size_gb: 40
- type: thin
- datastore: itdesx01-data01
- vm_nic:
- nic1:
- type: vmxnet3
- network: 10.10.0.0
- network_type: standard
- vm_hardware:
- memory_mb: 1024
- num_cpus: 2
- esxi:
- datacenter: DatacenterName
- hostname: esx01.domain.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement