Ansible and openstack questions

311 views
Skip to first unread message

Patrick Galbraith

unread,
Mar 29, 2014, 12:57:34 PM3/29/14
to ansible...@googlegroups.com
Hi all!

I am trying to use the nova_compute plugin and keep on getting:

ERROR: nova_compute is not a legal parameter in an Ansible Playbook

ansible-doc, if I run it, shows that the module is there as well as looking in /usr/share/ansible/cloud/ (nova_compute is there). This is ansible 1.5.3.

I'm using the example found in the actual documentation:

- nova_compute:
       state: present
       login_username: xxx
       login_password: xxx
       login_tenant_name: xxx-project1
       name: vm1
       region_name: region-b.geo-1
       image_id: 9302692b-b787-4b52-a3a6-daebb79cb498
       key_name: test
       wait_for: 200
       flavor_id: 101
       security_groups: default
       nics:
         - net-id: 7da74520-9d5e-427b-a508-213c84e69616

So, what else does one need here? I simply want to get familiar with using this to launch instances and then manage them. Is there any simplified document that demonstrates this?

Regards and thank you!

Patrick

Michael DeHaan

unread,
Mar 30, 2014, 12:33:52 PM3/30/14
to ansible...@googlegroups.com
Can we see this in the full playbook context?




--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/7f313a6e-4382-4c9d-8724-7d5fc0df4e86%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Patrick Galbraith

unread,
Apr 2, 2014, 3:39:10 PM4/2/14
to ansible...@googlegroups.com
Thanks Michael,

I actually found a bug  (region wasn't being supplied to nova client "Client()") in the code and submitted a pull request to the nova_compute driver. My very simplistic example that now works with my fix, using HP Cloud, is the following:

# Creates a new VM and attaches to a network and passes metadata to the instance
- name: launch a nova instance
  hosts: localhost
  tasks:
  - name: launch an instance
    nova_compute:
      state: present
      login_username: myuser
      login_password: xxxx
      login_tenant_name: myuser-project1
      name: vm1
      auth_url: https://region-b.geo-1.identity.hpcloudsvc.com:35357/v2.0/

Michael DeHaan

unread,
Apr 2, 2014, 4:23:48 PM4/2/14
to ansible...@googlegroups.com
Yep, saw your ticket -- thanks.

Some testing on this to make sure it doesn't break normalish OpenStack while fixing your case might be welcome if possible, should someone want to give it a shot.


Matt Hughes

unread,
Sep 5, 2014, 2:12:34 PM9/5/14
to ansible...@googlegroups.com
It's not clear what the resolution here was.  I'm getting the same error with the latest master branch.

Michael DeHaan

unread,
Sep 5, 2014, 3:37:31 PM9/5/14
to ansible...@googlegroups.com
Did you mean "nova_compute is not a valid...".

Sounds like you have an indentation error in your playbook possibly, can you show an example?






--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages