# Ansible and openstack questions

**URL:** <https://forum.ansible.com/t/ansible-and-openstack-questions/14892>\
**Category:** Ansible Project\
**Created:** [March 29, 2014, 4:57pm UTC](https://forum.ansible.com/t/ansible-and-openstack-questions/14892 "2014-03-29T16:57:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Patrick\_Galbraith](https://avatars.discourse-cdn.com/v4/letter/p/48db29/32.png) [@Patrick\_Galbraith](https://forum.ansible.com/u/Patrick_Galbraith)\
**Post date:** [March 29, 2014, 4:57pm UTC](https://forum.ansible.com/t/ansible-and-openstack-questions/14892/1 "2014-03-29T16:57:34Z")

</div>

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  
auth\_url: [https://region-b.geo-1.identity.hpcloudsvc.com:35357/v2.0/tokens](https://region-b.geo-1.identity.hpcloudsvc.com:35357/v2.0/tokens)  
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

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [March 30, 2014, 4:33pm UTC](https://forum.ansible.com/t/ansible-and-openstack-questions/14892/2 "2014-03-30T16:33:52Z")

</div>

Can we see this in the full playbook context?

---

<div class="post-metadata">

**Author:** ![Patrick\_Galbraith](https://avatars.discourse-cdn.com/v4/letter/p/48db29/32.png) [@Patrick\_Galbraith](https://forum.ansible.com/u/Patrick_Galbraith)\
**Post date:** [April 2, 2014, 7:39pm UTC](https://forum.ansible.com/t/ansible-and-openstack-questions/14892/3 "2014-04-02T19:39:10Z")

</div>

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:

```auto
# 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/
      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
      

```

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [April 2, 2014, 8:23pm UTC](https://forum.ansible.com/t/ansible-and-openstack-questions/14892/4 "2014-04-02T20:23:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Matt\_Hughes](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@Matt\_Hughes](https://forum.ansible.com/u/Matt_Hughes)\
**Post date:** [September 5, 2014, 6:12pm UTC](https://forum.ansible.com/t/ansible-and-openstack-questions/14892/5 "2014-09-05T18:12:34Z")

</div>

It’s not clear what the resolution here was. I’m getting the same error with the latest master branch.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [September 5, 2014, 7:37pm UTC](https://forum.ansible.com/t/ansible-and-openstack-questions/14892/6 "2014-09-05T19:37:28Z")

</div>

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?
