---
- name: Example
hosts: localhost
connection: local
vars:
ovirt_auth:
username: 'admin@internal'
password: 'pass'
url: 'https://engine.localdomain/ovirt-engine/api'
insecure: True
ca_file: '/root/ansible/engine.ca'
- name: Power on {{ outer_item }} after snapshot restore
ovirt_vm:
auth: "{{ ovirt_auth }}"
state: running
name: "{{ item }}"
loop:
- VM1
- VM2
Yeah, you have to fix the tabulations (both Ansible and Python are pain in the *** )
Best Regards,
Strahil Nikolov
В сряда, 30 септември 2020 г., 21:01:26 Гринуич+3, Jeremey Wise
<jeremey.wise(a)gmail.com> написа:
Can anyone post link. (with examples.. as most documentation for oVirt lacks this)..
where I can power on a VM via CLI or API.
As of now I cannot login to oVirt-Engine. No errors when I restart
it.. https://lists.ovirt.org/archives/list/users@ovirt.org/thread/45KKF5...
BUt... I need to get VMs booted.
I tried to follow:
http://ovirt.github.io/ovirt-engine-api-model/master/
and my server's API web portal
https://ovirte01.penguinpages.local/ovirt-engine/apidoc/#/documents/003_c...
And.. even get POSTMAN (real newbie at that tool but ran into how to add exported .pem key
from portal to session issues)
# failed CLI example: Power on VM "ns01"
########### <<<< DRAFT :: 2020-09-30################
# Get key from oVirt engine and import. Ex: from ovirte01 into server 'thor
curl -k
'https://ovirte01.penguinpages.local/ovirt-engine/services/pki-resource?resource=ca-certificate&format=X509-PEM-CA'
-o ovirt01_ca.pem
sudo cp ovirt01_ca.pem /etc/pki/ca-trust/source/anchors
sudo update-ca-trust extract
openssl s_client -connect ovirte01.penguinpages.local:443 -showcerts < /dev/null
<snip... lots of key info back>
# Use key during GET list of VMs
?? <meh?
# Power on VM <<fubar still>
curl -X POST
https://ovirte01.penguinpages.local/post -H /ovirt-engine/api/vms/ns01/start
HTTP/1.1
#####
I just need to power on VM
--
penguinpages
_______________________________________________
Users mailing list -- users(a)ovirt.org
To unsubscribe send an email to users-leave(a)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/UN4AHVRITGB...