I'd be very interested in a pull request if you'd like to send it along.

My outside understanding was ovirt was starting to taper off in favor of
Red Hat investing more in OpenStack, but there's no reason the module can't
be updated for sure.

(Also, that might not be entirely correct...)

--Michael


On Wed, Aug 13, 2014 at 8:01 AM, Karl E. Jorgensen <[email protected]>
wrote:

> Hi
>
> We are using ansible internally (unofficially, as the company
> standard-which-must-be-followed-regardless is puppet, but that is a
> different story), and I ended up re-writing the ovirt module quite a
> bit - the existing ovirt module had several problems:
>
> - Error reporting was... not really working
>
> - Support for quotas wasn't there
>
> - Getting information about servers to start VNC console would be nice
>
> and in general, I was not too happy with the code.
>
> Perhaps this will be useful for others?  It has only been tested in
> our own environment, against one version of RHEV, so it is probably
> not ready for prime time yet..
>
> I probably have to approach the legal department here for this,
> they're quite touchy about "IP rights" and stuff like that - advice
> for this will be appreciated too.  I realise this part is outside the
> remit of this mailing list, but pointers in the right direction will
> be appreciated.
>
> On Thu, Jul 24, 2014 at 01:49:33PM +0200, Vincent Van der Kussen wrote:
> > I might have a look at this. Not sure if the API has changed over time.
> > I still have a RHEV setup running where I can test on
> >
> > Regards,
> > Vincent
> >
> > On Thu, Jul 24, 2014 at 1:10 PM, Michael DeHaan <[email protected]>
> wrote:
> > > 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?
> > >>
> > >
> > >
> > >
> > > For more options, visit https://groups.google.com/d/optout.
> >
>
> --
> Karl E. Jorgensen
>
> --
> 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/20140813120104.GG5139%40hawking
> .
> 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%2BnsWgwmWemn%3DQ6WvYOtToHPZQiek8qfWeLjGhB0C3WujmqfUQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to