The problem is that the shade module requires python 2.7 as it stands.  I 
believe there is a PR for shade module to support python 2.6.

On Monday, June 1, 2015 at 5:10:44 PM UTC-4, Goldberg Eduard wrote:
>
> Hi,
>
> I'm trying to launch an instance using os_server module
> Using simple playbook
> - name: create openstack instance
>   hosts: local_host
>   tasks:
>   - name: launch instance
>     os_server:
>        auth:
>          auth_url: http://<*some url>*
>          username: ansible
>          password: ansible
>          project_name: ansible
>        state: present
>        name: ldap_client
>        image: 0b9d8320-93f7-4814-a03d-4c51f15bab84
>        key_name: ansible_key
>        timeout: 200
>        flavor: 2
>        nics:
>          - net-id: 1446ba1c-341c-4633-84ba-ac0787d162a2
>          - net-name: private
>        security_groups: default
>        meta:
>          hostname: ldap_client
>        wait: yes
>
> Getting following syntax error in *shade *when running
>
>  *ansible-playbook -v -i hosts new_openstack_instance.yml*
>
> *PLAY [create openstack instance] 
> ***********************************************
>
> *GATHERING FACTS 
> ****************************************************************
> *ok: [localhost]*
>
> *TASK: [launch instance] 
> ********************************************************
> *failed: [localhost] => {"failed": true, "parsed": false, "playbook": 
> "new_openstack_instance.yml", "role": null, "task": "launch instance"}*
> *Traceback (most recent call last):*
> *  File 
> "/root/.ansible/tmp/ansible-tmp-1433192026.99-61510740137065/os_server", 
> line 23, in <module>*
> *    import shade*
> *  File "/usr/lib/python2.6/site-packages/shade/__init__.py", line 112*
> *    for k in kwargs.keys() if k.endswith(service_key)}*
> *      ^*
> *SyntaxError: invalid syntax*
>
> *FATAL: all hosts have already failed -- aborting*
>
> *PLAY RECAP 
> *********************************************************************
> *           to retry, use: --limit @/root/new_openstack_instance.retry*
>
> *localhost                  : ok=1    changed=0    unreachable=0   
>  failed=1*
>
>
> Any suggestions?
> Thanks in advance
>
>
>

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c3ea52be-9a15-473a-9836-56c9bd2dea4f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to