Skip to content

Instantly share code, notes, and snippets.

@Govinda-Fichtner
Created April 28, 2014 12:16
Show Gist options
  • Save Govinda-Fichtner/11370085 to your computer and use it in GitHub Desktop.
Save Govinda-Fichtner/11370085 to your computer and use it in GitHub Desktop.
vsphere_guest with yaml dictionary and variables
- name: adjust vm hardware settings
connection: local
hosts:
- all:!virtual_cluster_ip*
user: root
serial: 1
gather_facts: False
tasks:
- vsphere_guest:
vcenter_hostname: 192.168.200.200
username: username
password: password
guest: "{{ fqdn }}"
state: reconfigured
vm_extra_config:
vcpu.hotadd: yes
mem.hotadd: yes
notes: This is a test VM
vm_hardware:
memory_mb: "{{ vm_memory }}"
num_cpus: "{{ vm_cpus }}"
osid: Ubuntu Linux (64-bit)
scsi: paravirtual
esxi:
datacenter: some_data
hostname: some.host
force: yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment