No changes happening under vm_extra_config?

73 views
Skip to first unread message

Mark Matthews

unread,
Feb 5, 2016, 8:45:39 AM2/5/16
to Ansible Project
Hi

I've configured the below playbook which works fine, except for one thing....nothing is happening under the vm_extra_config section?

Is there something that I have done wrong or is this a bug?

---
 - hosts: 127.0.0.1
   connection: local
   user: root
   sudo: false
   gather_facts: false
   serial: 1
   vars:
     vcenter_hostname: xxx.xxx.xxx
     esxhost: xxx.xxx.xxx.xxx
     datastore: UK-xxxx
     network: Web Servers
     vmtemplate: WIN2K12R2-TEMPLATE
     vmcluster: UK-CLUSTER
     username: xxxxxxxxx
     password: xxxxxxxx
     folder: Labs
     notes: Created by Ansible

   tasks:
    - name: Create VM from template
      vsphere_guest:
        vcenter_hostname: "{{ vcenter_hostname }}"
        username: "{{ username }}"
        password: "{{ password }}"
        guest: "UK-ANSIBLE-TEST0{{ name }}"
        from_template: yes
        template_src: "{{ vmtemplate }}"
        cluster: "{{ vmcluster  }}"
        resource_pool: "/Resources"
        vm_extra_config:
          notes: "{{ notes }}"
          folder: "{{ folder }}"
        esxi:
          datacenter: UK
          hostname: "{{ esxhost }}"

Mark Matthews

unread,
Feb 5, 2016, 9:30:05 AM2/5/16
to Ansible Project

So I ran a playbook to setup a VM from scratch (not using a template), and the vm_extra_config works. It creates the VM in the folder that I specified.

What does this mean? The vm_extra_config does not work with templates?

I did see this page: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!searchin/ansible-project/vm_extra_config/ansible-project/9Ki7tPqW2i0/vz0swUJ6CAAJ

Any ideas?

Reply all
Reply to author
Forward
0 new messages