os_server create instance failed with attributeError

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.

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/

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

Looks like you need to upgrade the Python six module.

-Dave

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