# vsphere\_guest module not recognizing from\_template param

**URL:** <https://forum.ansible.com/t/vsphere-guest-module-not-recognizing-from-template-param/17542>\
**Category:** Ansible Project\
**Tags:** vmware\
**Created:** [February 18, 2015, 4:10am UTC](https://forum.ansible.com/t/vsphere-guest-module-not-recognizing-from-template-param/17542 "2015-02-18T04:10:20Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![John-Paul\_Herold](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@John-Paul\_Herold](https://forum.ansible.com/u/John-Paul_Herold)\
**Post date:** [February 18, 2015, 4:10am UTC](https://forum.ansible.com/t/vsphere-guest-module-not-recognizing-from-template-param/17542/1 "2015-02-18T04:10:20Z")

</div>

Greetings,

Ansible: 1.9  
pysphere: 1.7

I’ve been experimenting with the vsphere\_guest module and am experiencing some problems with the ‘from\_template’ parameter. I am using the “# Deploy a guest from a template” example from the [docs](http://docs.ansible.com/vsphere_guest_module.html). Immediately after executing the play, which matches the doc example, I get the following failed message:

“unsupported parameter for module: from\_template.”

Also just for my own sanity, I confirmed ‘from\_template’ is a param in my checkout out `ansible/lib/ansible/modules/core/cloud/vmware/vsphere_guest.py`. Anyone have any ideas?

Cheers,  
John-Paul

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [February 18, 2015, 7:01am UTC](https://forum.ansible.com/t/vsphere-guest-module-not-recognizing-from-template-param/17542/2 "2015-02-18T07:01:56Z")

</div>

Can you share your playbook?

---

<div class="post-metadata">

**Author:** ![John-Paul\_Herold](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@John-Paul\_Herold](https://forum.ansible.com/u/John-Paul_Herold)\
**Post date:** [February 18, 2015, 3:01pm UTC](https://forum.ansible.com/t/vsphere-guest-module-not-recognizing-from-template-param/17542/3 "2015-02-18T15:01:10Z")

</div>

Sure! [http://pastebin.com/1KM7Zyez](http://pastebin.com/1KM7Zyez)

Let me know if you have any other questions. Thanks!

---

<div class="post-metadata">

**Author:** ![Mark\_Phillips](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@Mark\_Phillips](https://forum.ansible.com/u/Mark_Phillips)\
**Post date:** [February 18, 2015, 5:14pm UTC](https://forum.ansible.com/t/vsphere-guest-module-not-recognizing-from-template-param/17542/4 "2015-02-18T17:14:00Z")

</div>

Hello John-Paul,

You’ve not, by any chance, got more than one Ansible on your system have you?

---

<div class="post-metadata">

**Author:** ![John-Paul\_Herold](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@John-Paul\_Herold](https://forum.ansible.com/u/John-Paul_Herold)\
**Post date:** [February 18, 2015, 5:20pm UTC](https://forum.ansible.com/t/vsphere-guest-module-not-recognizing-from-template-param/17542/5 "2015-02-18T17:20:41Z")

</div>

A very valid question haha, but no I do not. I’ve tested it locally on my laptop, as well as an ansible control box I have in the same environment as my vsphere cluster.

---

<div class="post-metadata">

**Author:** ![Mark\_Phillips](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@Mark\_Phillips](https://forum.ansible.com/u/Mark_Phillips)\
**Post date:** [February 18, 2015, 5:26pm UTC](https://forum.ansible.com/t/vsphere-guest-module-not-recognizing-from-template-param/17542/6 "2015-02-18T17:26:50Z")

</div>

Worth checking 😉

I’ve been using the template stuff since late December, and it’s working all fine. However, saying that, I’ve not tried a recent code base. Is your 1.9 pull really recent? I’ll try a bang up to date pull and see if I get the same…

---

<div class="post-metadata">

**Author:** ![Mark\_Phillips](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@Mark\_Phillips](https://forum.ansible.com/u/Mark_Phillips)\
**Post date:** [February 18, 2015, 5:38pm UTC](https://forum.ansible.com/t/vsphere-guest-module-not-recognizing-from-template-param/17542/7 "2015-02-18T17:38:30Z")

</div>

OK, with an RPM built last weekend it still works just fine for me…

$ rpm -q ansible  
ansible-1.9-0.git201502131321.el7.centos.noarch

$ ansible --version  
ansible 1.9  
configured module search path = None

$ ./scripts/newvm mptest.satapp

PLAY [vmcreate] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

TASK: [Check for required variables] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
skipping: [local]

TASK: [Check for vSphere access parameters] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
skipping: [local]

TASK: [Create VM from template] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
changed: [local]

My play looks like: [https://gist.github.com/phips/7c25ccc74f2aee268ed8](https://gist.github.com/phips/7c25ccc74f2aee268ed8)

---

<div class="post-metadata">

**Author:** ![John-Paul\_Herold](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@John-Paul\_Herold](https://forum.ansible.com/u/John-Paul_Herold)\
**Post date:** [February 18, 2015, 5:47pm UTC](https://forum.ansible.com/t/vsphere-guest-module-not-recognizing-from-template-param/17542/8 "2015-02-18T17:47:13Z")

</div>

It is indeed a very recent pull, I installed from source. Would you mind trying the same and giving it a go?

Regardless, thank you for the quick check, all signs point to my local install. I guess this gives me a great excuse to finally Ansible the bootstrapping of my control boxes themselves so I can figure this out!

---

<div class="post-metadata">

**Author:** ![Mark\_Phillips](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@Mark\_Phillips](https://forum.ansible.com/u/Mark_Phillips)\
**Post date:** [February 18, 2015, 5:54pm UTC](https://forum.ansible.com/t/vsphere-guest-module-not-recognizing-from-template-param/17542/9 "2015-02-18T17:54:46Z")

</div>

Well, I went to roll the latest and greatest and there are some tests failing (I have the ‘make rpm’ rolled up in Jenkins) - so it doesn’t build.

Will check it again for you tomorrow John-Paul, in case something gets fixed today.

---

<div class="post-metadata">

**Author:** ![Mark\_Phillips](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@Mark\_Phillips](https://forum.ansible.com/u/Mark_Phillips)\
**Post date:** [February 18, 2015, 6:02pm UTC](https://forum.ansible.com/t/vsphere-guest-module-not-recognizing-from-template-param/17542/10 "2015-02-18T18:02:23Z")

</div>

OK, ignored tests and rolled RPM from a pull in the last five minutes.

Still works fine for me 🙂

Sorry John-Paul, must be something locally.

$ rpm -q ansible  
ansible-1.9-0.git201502181612.el7.centos.noarch  
$ !$ --version  
ansible --version  
ansible 1.9  
configured module search path = None

---

<div class="post-metadata">

**Author:** ![John-Paul\_Herold](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@John-Paul\_Herold](https://forum.ansible.com/u/John-Paul_Herold)\
**Post date:** [February 18, 2015, 6:18pm UTC](https://forum.ansible.com/t/vsphere-guest-module-not-recognizing-from-template-param/17542/11 "2015-02-18T18:18:36Z")

</div>

Thank you Mark! I’m going to figure this out. Using a VM and re-installing, I think it was me being an oaf and not running `source ./hacking/env-setup` post checkout…

Good thing is, I am not motivated to create a role for Ansible control boxes themselves, and I got to take a peek at your usage of vsphere\_guest, which I think looks very nice and elegant (plus the tasks to check for extra params are something I have been wanting to add!).

Appreciate everyone’s time and the Ansible community as a whole.
