On Thu, Nov 28, 2019 at 4:59 PM Nathanaël Blanchet <blanchet@abes.fr> wrote:

Hello gianluca,

I reported this issue a long time ago (march of 19) in an unofficial rpm awx project

https://github.com/MrMEEE/awx-build/issues/72


But I see that it is marked as closed.... 

All related RHV/ovirt stuff (not only dynamic inventory, but all ovirt* ansible module) fail because of the version of pycurl (worked before 7.19)

You mean inside awx container, correct?
See below my comments, as I know almost nothing about venv concepts... sorry

What you need to do is create a py2.x venv then recompile latest pycurl with nss support like this:

  • # /opt/rh/rh-python36/root/usr/bin/awx-create-venv (-e /var/lib/awx/venv/) -n ovirt
I have to run this inside awx container as user root? Can you explain the syntax? I get error because of the parenthesis...
 
  • source /var/lib/awx/venv/ovirt/bin/activate 
as root correct? and I should source the just created venv, correct?
  • # (ovirt) export PYCURL_SSL_LIBRARY=nss; pip install pycurl --compile --no-cache-dir
I presume (ovirt) is a sort of prompt of the venv 
Will the settings preserved across reboot of the server hosting the container?
  • choose this venv instead of the regular in your inventory page and you'll be able to sync
I don't see in awx an option to specify a venv or another... 

PS: Something else that may help, try to hack the ovirt4.py with ansible_host if you want to call the hosts into playbook by the hostname and not the first IP:

vi /opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/awx/plugins/inventory/ovirt4.py

'affinity_labels': [label.name for label in labels],
## ajout NBT pour obtenir le nom de l'hote a la place de l ip
'ansible_host': vm.name,
'affinity_groups': [


I will investigate, thanks. 
Gianluca