deploying template with vsphere_guest failing

38 views
Skip to first unread message

Jeff Richards

unread,
Jun 8, 2016, 8:51:15 PM6/8/16
to Ansible Project
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:
"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

Ayan Dasgupta

unread,
Jun 9, 2016, 5:46:58 AM6/9/16
to Ansible Project
Can you try adding a dummy resource pool in your code if you don't have any in our environment ?

Example :--

resource_pool: "/Resources"

Jeff Richards

unread,
Jun 9, 2016, 3:11:53 PM6/9/16
to Ansible Project
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:
"vsphere_guest now can deploy a template using a datacenter and hostname as the target, instead of requiring a cluster and resource_pool."

Jeff

Jeff Richards

unread,
Jun 9, 2016, 3:27:26 PM6/9/16
to Ansible Project
Ok, end of puzzle; this works fine in Ansible 2.x

Jeff
Reply all
Reply to author
Forward
0 new messages