Can you add guestinfo. to a VM in vsphere through ansible?

142 views
Skip to first unread message

Brandon Hudlemeyer

unread,
Nov 18, 2016, 12:10:34 PM11/18/16
to Ansible Project
I searched and couldn't find anything saying one way or the other but I am trying to basically build a bunch of Coreos VMs(just for lab and practice) using ansible. I can deploy them just fine but I would like to do what I do in powershell and modify the guestinfo to provide Coreos with its settings on the vms them selves. 

The playbook creates the vms just fine their setting just aren't updated. 

My vm_extra's info:

       vm_extra_config:
         guestinfo.coreos.config.data.encoding: "base64"
         guestinfo.interface.0.dhcp: "no"
         guestinfo.coreos.config.data: "{{ base64 }}"
         guestinfo.dns.server.0: "{{ dns }}"
         guestinfo.interface.0.ip.0.address: "{{ item.value.ip }}"
         guestinfo.interface.0.route.0.gateway: "{{ gateway }}"
         guestinfo.interface.0.role: "private"
         guestinfo.interface.0.route.0.destination: "0.0.0.0/0"
         guestinfo.interface.0.name: "ens192"
         guestinfo.hostname: "{{ item.key }}"
         vcpu.hotadd: yes
         mem.hotadd:  yes
         notes: Mesos
         folder: Mesos


The note and the folder work fine but nothing else.
Reply all
Reply to author
Forward
0 new messages