deploying template with vsphere_guest failing

When trying to deploy a template (Ansible 1.9.6) as follows:

  • hosts: 127.0.0.1
    connection: local
    user: root
    sudo: false
    gather_facts: false
    serial: 1

tasks:

  • vsphere_guest:
    vcenter_hostname: XXXXXXXXX
    username: XXXXXXXXXX
    password: ‘XXXXXX’
    guest: testvm
    from_template: yes
    template_src: XXXXXXXXXXX
    esxi:
    datacenter: XXXXX
    hostname: XXXXXXx

I get the error:
msg: parameters are required together: [‘from_template’, ‘resource_pool’, ‘template_src’]

Now this is well documented and was addressed some time back:
https://github.com/rce/ansible-modules-core/commit/1a8da60253ddeb761110102f2b4421ffdc36c401

“vsphere_guest now can deploy a template using a datacenter and hostname as the target, instead of requiring a cluster and resource_pool.”

Any idea why I appear to be seeing a regression here?

Jeff

Can you try adding a dummy resource pool in your code if you don’t have any in our environment ?

Example :–

resource_pool: “/Resources”

Yes, already tried that, it just errors saying I also need to specify a cluster - and there’s no dummy resource for that.

It’s exactly what was described (and fixed(?)) here:

https://github.com/rce/ansible-modules-core/commit/1a8da60253ddeb761110102f2b4421ffdc36c401

“vsphere_guest now can deploy a template using a datacenter and hostname as the target, instead of requiring a cluster and resource_pool.”

Jeff

Ok, end of puzzle; this works fine in Ansible 2.x

Jeff