vsphere_guest module not recognizing from_template param

188 views
Skip to first unread message

John-Paul Herold

unread,
Feb 17, 2015, 11:10:20 PM2/17/15
to ansible...@googlegroups.com
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. 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

J Hawkesworth

unread,
Feb 18, 2015, 2:01:56 AM2/18/15
to ansible...@googlegroups.com
Can you share your playbook?

John-Paul Herold

unread,
Feb 18, 2015, 10:01:11 AM2/18/15
to ansible...@googlegroups.com
Sure! http://pastebin.com/1KM7Zyez

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

Mark Phillips

unread,
Feb 18, 2015, 12:14:00 PM2/18/15
to ansible...@googlegroups.com
Hello John-Paul,

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

John-Paul Herold

unread,
Feb 18, 2015, 12:20:42 PM2/18/15
to ansible...@googlegroups.com
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.

Mark Phillips

unread,
Feb 18, 2015, 12:26:50 PM2/18/15
to ansible...@googlegroups.com
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...

Mark Phillips

unread,
Feb 18, 2015, 12:38:30 PM2/18/15
to ansible...@googlegroups.com
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]

John-Paul Herold

unread,
Feb 18, 2015, 12:47:14 PM2/18/15
to ansible...@googlegroups.com
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!

Mark Phillips

unread,
Feb 18, 2015, 12:54:46 PM2/18/15
to ansible...@googlegroups.com
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.

Mark Phillips

unread,
Feb 18, 2015, 1:02:23 PM2/18/15
to ansible...@googlegroups.com
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


John-Paul Herold

unread,
Feb 18, 2015, 1:18:36 PM2/18/15
to ansible...@googlegroups.com
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.

Reply all
Reply to author
Forward
0 new messages