Are their any ovirt users that would like to help with this one?

https://github.com/ansible/ansible/commits/devel/library/cloud/ovirt






On Thu, Jul 24, 2014 at 4:26 AM, Piet83 <[email protected]> wrote:

> Hello,
>
> I'm trying to setup vm provisioning for Rhev with the ansible ovirt
> module. I have installed ovirt-engine-sdk-python-3.4.0.7-1.el6.noarch on my
> Centos 6.5 Ansible server and created a simple playbook to play around with
> this. The playbook tries to provision a vm based on a template defined
> within the Rhev manager:
>
>
> ---
> - hosts: localhost
>
>   tasks:
>   - name: create vm based on template
>     ovirt: user=admin@internal url=https://rhevm.domain.nl/
> instance_name=ansibletest2 password=xxxxxxxxxx image=Ubuntu_template
> zone=datacenter_default resource_type=new
>
>
> When I run this play book I get the following output:
>
> ansible-playbook -v create_vm.yml
>
> PLAY [localhost]
> **************************************************************
>
> GATHERING FACTS
> ***************************************************************
> ok: [localhost]
>
> TASK: [create vm]
> *************************************************************
> failed: [localhost] => {"failed": true, "parsed": false}
> invalid output was: Traceback (most recent call last):
>   File
> "/root/.ansible/tmp/ansible-tmp-1406189516.72-109759934250973/ovirt",
> line 1642, in <module>
>     main()
>   File
> "/root/.ansible/tmp/ansible-tmp-1406189516.72-109759934250973/ovirt",
> line 379, in main
>     if get_vm(c, vmname) == "empty":
>   File
> "/root/.ansible/tmp/ansible-tmp-1406189516.72-109759934250973/ovirt",
> line 311, in get_vm
>     vm = conn.vms.get(name=vmname)
>   File
> "/usr/lib/python2.6/site-packages/ovirtsdk/infrastructure/brokers.py",
> line 18940, in get
>     headers={"All-Content":all_content}
>   File "/usr/lib/python2.6/site-packages/ovirtsdk/infrastructure/proxy.py"
> , line 58, in get
>     return self.request(method='GET', url=url, headers=headers)
>   File "/usr/lib/python2.6/site-packages/ovirtsdk/infrastructure/proxy.py"
> , line 118, in request
>     persistent_auth=self._persistent_auth)
>   File "/usr/lib/python2.6/site-packages/ovirtsdk/infrastructure/proxy.py"
> , line 140, in __doRequest
>     persistent_auth=persistent_auth
>   File "/usr/lib/python2.6/site-packages/ovirtsdk/web/connection.py",
> line 134, in doRequest
>     raise RequestError, response
> ovirtsdk.infrastructure.errors.RequestError:
> status: 401
> reason: Unauthorized
> detail: JBWEB000065: HTTP Status 401
>
>
> FATAL: all hosts have already failed -- aborting
>
> On the rhev manager server I see the following output in the
> /var/log/ovirt-engine/engine.log:
>
> 2014-07-24 10:21:42,769 INFO  [org.ovirt.engine.core.bll.LoginUserCommand]
> (ajp-/127.0.0.1:8702-7) Running command: LoginUserCommand internal: false.
> 2014-07-24 10:21:42,783 INFO
>  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector]
> (ajp-/127.0.0.1:8702-7) Correlation ID: null, Call Stack: null, Custom
> Event ID: -1, Message: User admin logged in.
>
> It seems to logon to the rhev api but sill I'm getting a 401 Unauthorized
> message when using the ansible ovirt module.
> Is there someone who can help me resolve this?
>
>  --
> 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 [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/47a76152-fe0f-4734-b390-69470a604947%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/47a76152-fe0f-4734-b390-69470a604947%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgyrNkSGjXq6iDKeMCuADdRjuZHtd7RCnt%3DdfCPLr0cp%3DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to