# os\_server create instance failed with attributeError

**URL:** <https://forum.ansible.com/t/os-server-create-instance-failed-with-attributeerror/19838>\
**Category:** Ansible Project\
**Created:** [November 24, 2015, 7:42am UTC](https://forum.ansible.com/t/os-server-create-instance-failed-with-attributeerror/19838 "2015-11-24T07:42:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hardik\_Italia](https://avatars.discourse-cdn.com/v4/letter/h/e79b87/32.png) [@Hardik\_Italia](https://forum.ansible.com/u/Hardik_Italia)\
**Post date:** [November 24, 2015, 7:42am UTC](https://forum.ansible.com/t/os-server-create-instance-failed-with-attributeerror/19838/1 "2015-11-24T07:42:36Z")

</div>

Hi,

I am trying to create a instance in openstack environment using ansible module os\_server and getting following errors. Any suggestions?

I install ansible from the source by following instruction from [http://docs.ansible.com/ansible/intro\_installation.html#running-from-source](http://docs.ansible.com/ansible/intro_installation.html#running-from-source).

jenkins@jenkins-ansible:~$ ansible --version  
ansible 2.0.0  
config file = /etc/ansible/ansible.cfg  
configured module search path = Default w/o overrides

Playbook:

- name: launch a compute instance

hosts: localhost

tasks:

- name: launch an instance

os\_server:

state: present

auth:

auth\_url: [http://10.10.10.10:35357/v2.0/](http://10.10.10.10:35357/v2.0/)

username: admin

password: admin

project\_name: admin

name: vm1

image: c88964bd-14e6-4c9b-9d31-42f348f53eb9

key\_name: vm\_rsa

timeout: 200

flavor: 4

security\_groups: default

nics:

- net-id: c88964bd-14e6-4c9b-9d31-42f348f53eb9

- net-name: n1

PLAY [launch a compute instance] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

TASK [setup] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
ok: [127.0.0.1]

TASK [launch an instance] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [127.0.0.1]: FAILED! =\> {“changed”: false, “failed”: true, “msg”: “Traceback (most recent call last):\r\n File "/home/jenkins/.ansible/tmp/ansible-tmp-1448333412.82-245001675947198/os\_server", line 24, in \r\n import shade\r\n File "/usr/local/lib/python2.7/dist-packages/shade/ **init**.py", line 24, in \r\n from shade.openstackcloud import OpenStackCloud\r\n File "/usr/local/lib/python2.7/dist-packages/shade/openstackcloud.py", line 32, in \r\n from keystoneclient import client as keystone\_client\r\n File "/usr/local/lib/python2.7/dist-packages/keystoneclient/client.py", line 15, in \r\n from keystoneclient import discover\r\n File "/usr/local/lib/python2.7/dist-packages/keystoneclient/discover.py", line 24, in \r\n from keystoneclient.v2\_0 import client as v2\_client\r\n File "/usr/local/lib/python2.7/dist-packages/keystoneclient/v2\_0/ **init**.py", line 1, in \r\n from keystoneclient.v2\_0.client import Client # noqa\r\n File "/usr/local/lib/python2.7/dist-packages/keystoneclient/v2\_0/client.py", line 21, in \r\n from keystoneclient import httpclient\r\n File "/usr/local/lib/python2.7/dist-packages/keystoneclient/httpclient.py", line 152, in \r\n class HTTPClient(baseclient.Client, base.BaseAuthPlugin):\r\n File "/usr/local/lib/python2.7/dist-packages/keystoneclient/httpclient.py", line 262, in HTTPClient\r\n user\_agent=USER\_AGENT, connect\_retries=None, \*\*kwargs):\r\n File "/usr/local/lib/python2.7/dist-packages/debtcollector/renames.py", line 38, in decorator\r\n @six.wraps(f)\r\nAttributeError: ‘module’ object has no attribute ‘wraps’\r\n”, “parsed”: false}

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
127.0.0.1 : ok=1 changed=0 unreachable=0 failed=1

Thanks,  
Hardik

---

<div class="post-metadata">

**Author:** ![David\_Shrewsbury1](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@David\_Shrewsbury1](https://forum.ansible.com/u/David_Shrewsbury1)\
**Post date:** [November 24, 2015, 5:16pm UTC](https://forum.ansible.com/t/os-server-create-instance-failed-with-attributeerror/19838/2 "2015-11-24T17:16:33Z")

</div>

Looks like you need to upgrade the Python six module.

-Dave

---

<div class="post-metadata">

**Author:** ![Hardik\_Italia](https://avatars.discourse-cdn.com/v4/letter/h/e79b87/32.png) [@Hardik\_Italia](https://forum.ansible.com/u/Hardik_Italia)\
**Post date:** [November 25, 2015, 12:42am UTC](https://forum.ansible.com/t/os-server-create-instance-failed-with-attributeerror/19838/3 "2015-11-25T00:42:13Z")

</div>

Thanks for your reply.

I have updated python six module but still getting same errors,

six - Python 2 and 3 compatibility utilities  
INSTALLED: 1.10.0 (latest)

Thanks,  
hardik
