Command line management and ansible error

Hello guys, So i read in the documentation that managing VMs is not done with ovirt-shell anymore, ansible should be used instead. Ansible can manage VMs via modules, connecting to the Manager VM. However, how can i start the Manager VM itself, if it stopped? (it just happened to me) Catch 22 problem :) Anyway, i tried using the ovirt_vm_info modulei in ansible, but it resulted in an error, because the web interface is running with a self signed certificate, configured by the engine setup: " An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ovirtsdk4.Error: Error while sending HTTP request: (60, 'SSL certificate problem: self signed certificate in certificate chain') fatal: [192.168.0.200]: FAILED! => {"changed": false, "msg": "Error while sending HTTP request: (60, 'SSL certificate problem: self signed certificate in certificate chain')"} " I know this is a curl error. In the shell, the option -k or --insecure can be used. How to use that option in the ansible module? Thanks in advance for any pointers on this!

I would use the uri module to download the Engine's CA to /etc/pki/ca-cert/sources (or whatever it was) on EL systems (in debian-based is a little bit different) locally and then run 'update-ca-certificates --extract' . Usually I run my ansible from the engine itself. Have you thought about it ? Best Regards,Strahil Nikolov On Thu, Apr 21, 2022 at 10:02, fs3000--- via Users<users@ovirt.org> wrote: Hello guys, So i read in the documentation that managing VMs is not done with ovirt-shell anymore, ansible should be used instead. Ansible can manage VMs via modules, connecting to the Manager VM. However, how can i start the Manager VM itself, if it stopped? (it just happened to me) Catch 22 problem :) Anyway, i tried using the ovirt_vm_info modulei in ansible, but it resulted in an error, because the web interface is running with a self signed certificate, configured by the engine setup: " An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ovirtsdk4.Error: Error while sending HTTP request: (60, 'SSL certificate problem: self signed certificate in certificate chain') fatal: [192.168.0.200]: FAILED! => {"changed": false, "msg": "Error while sending HTTP request: (60, 'SSL certificate problem: self signed certificate in certificate chain')"} " I know this is a curl error. In the shell, the option -k or --insecure can be used. How to use that option in the ansible module? Thanks in advance for any pointers on this! _______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/E2UDQXVFBSON46...

I would use the uri module to download the Engine's CA to /etc/pki/ca-cert/sources (or whatever it was) on EL systems (in debian-based is a little bit different) locally and then run 'update-ca-certificates --extract' .
I did that, even to /usr/share/pki/ and run the command of course. Nothing worked.
Usually I run my ansible from the engine itself. Have you thought about it ?
Yes. Thing is, how can we manage the Manager VM itself if it's down? I tried to start it via virsh, but gave an error: virsh # start --domain Manager error: Failed to start domain 'Manager' error: Network not found: no network with matching name 'vdsm-ovirtmgmt' The interface ovirtmgmt exists tough. Anyway, this is so i can know what to do in case it fails. Because restart the whole server will bring it on of course. Or waiting some long time, till somehow it starts again :)

Hello, ovirt ansible modules have insecure parameter in auth. See definition here https://docs.ansible.com/ansible/latest/collections/ovirt/ovirt/ovirt_vm_inf... Best regards Lucie On 4/20/22 18:11, fs3000--- via Users wrote:
Hello guys,
So i read in the documentation that managing VMs is not done with ovirt-shell anymore, ansible should be used instead. Ansible can manage VMs via modules, connecting to the Manager VM. However, how can i start the Manager VM itself, if it stopped? (it just happened to me) Catch 22 problem :)
Anyway, i tried using the ovirt_vm_info modulei in ansible, but it resulted in an error, because the web interface is running with a self signed certificate, configured by the engine setup:
" An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ovirtsdk4.Error: Error while sending HTTP request: (60, 'SSL certificate problem: self signed certificate in certificate chain') fatal: [192.168.0.200]: FAILED! => {"changed": false, "msg": "Error while sending HTTP request: (60, 'SSL certificate problem: self signed certificate in certificate chain')"} "
I know this is a curl error. In the shell, the option -k or --insecure can be used. How to use that option in the ansible module?
Thanks in advance for any pointers on this! _______________________________________________ Users mailing list --users@ovirt.org To unsubscribe send an email tousers-leave@ovirt.org Privacy Statement:https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct:https://www.ovirt.org/community/about/community-guidelines/ List Archives:https://lists.ovirt.org/archives/list/users@ovirt.org/message/E2UDQXVFBSON46... --
Lucie Leistnerova Associate Manager, Quality Engineering, RHV - QE Core & Tools GChat: lleistne @ Virtualization <https://chat.google.com/room/AAAA7lwAJb4> Red Hat EMEA <https://www.redhat.com>

Hello, ovirt ansible modules have insecure parameter in auth.
See definition here https://docs.ansible.com/ansible/latest/collections/ovirt/ovirt/ovirt_vm_...
I embarassly say, thanks for that tip! No idea how i miss that... It works great now.

If you imported the engine's cert correctly into the system executing ansible, then a curl https://engine should not give any cert errors and thus ansible should not complain. Best Regards,Strahil Nikolov On Thu, Apr 21, 2022 at 18:09, fs3000--- via Users<users@ovirt.org> wrote: > Hello, ovirt ansible modules have insecure parameter in auth.
See definition here https://docs.ansible.com/ansible/latest/collections/ovirt/ovirt/ovirt_vm_...
I embarassly say, thanks for that tip! No idea how i miss that... It works great now. _______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/QM5SBDENPTZ4OH...
participants (3)
-
fs3000@pm.me
-
Lucie Leistnerova
-
Strahil Nikolov