Thank you. I am running a self-hosted engineVM, and having difficulty connecting the dots so ansible can talk to vms within the self-hosted engineVM.
Below is my setup-
inventory dir with files
cat ~/ansible/inventory/prod/hosts
[ovirt]
ovirt 192.168.1.100
cat ~/ansible/inventory/prod/ovirt.ini
[ovirt]
ovirt_url = https://engine.ovirt/ovirt-engine/api # this is self hosted engine. so invoking ./ovirt4.py fails with http error as physical host is 'ovirt' but self-hosted-engine fqdn is 'engine.ovirt'
ovirt_username = admin@internal
ovirt_password = password
ovirt_ca_file = ca.pem . # this sits on my local machine
running ovirt4.py standalone fails as mentioned above.
cat ~/ansible/playbook.yml
--- name: Talk to self-hosted-engine server
hosts: ovirt
tasks:
- name: Hello server
debug:
msg: Hello server
--- name: Talk to self-hosted-engine VM
hosts: status_up
tasks:
- name: Hello vms
debug:
msg: Hello vms
ansible-playbook -i ~/ansible/inventories/prod playbook.yml # prod folder has .ini, .py and static hosts file as above
PLAY [Talk to self-hosted-engine server] **********************************************************************************************
TASK [Gathering Facts] ****************************************************************************************************************
ok: [ovirt]
TASK [Hello server] *******************************************************************************************************************
ok: [ovirt] => {
"msg": "Hello server"
}
[WARNING]: Could not match supplied host pattern, ignoring: status_up
PLAY [Talk to self-hosted-engine VM] **************************************************************************************************
skipping: no hosts matched
PLAY RECAP ****************************************************************************************************************************
ovirt : ok=2 changed=0 unreachable=0 failed=0
Is there something i am missing?