openshift-auto-upi
openshift-auto-upi copied to clipboard
ovirt install: missing vsphere var??
When running the oVirt installer, the playbook returns an error and evidently expects a vsphere variable:
[justin@ales-helpernode openshift-auto-upi]$ ansible-playbook openshift_ovirt.yml
PLAY [helper] ********************************************************************************************************************************************************************************
...
TASK [openshift_common : Copy install-config.yaml to the /home/justin/openshift-auto-upi-workspace/ocp4410/conf directory] *******************************************************************
fatal: [helper]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'vsphere' is undefined"}
I checked the files that I'd edited for ovirt:
[justin@ales-helpernode openshift-auto-upi]$ ls -lrt inventory/group_vars/all/infra/
total 68
-rw-rw-r--. 1 justin justin 1642 Jun 25 15:59 helper.yml
-rw-rw-r--. 1 justin justin 123 Jun 25 15:59 dns_server.yml.sample
-rw-rw-r--. 1 justin justin 130 Jun 25 15:59 dnsmasq.yml.sample
-rw-rw-r--. 1 justin justin 40 Jun 25 15:59 dns_client.yml.sample
-rw-rw-r--. 1 justin justin 267 Jun 25 15:59 dhcp_server.yml.sample
-rw-rw-r--. 1 justin justin 41 Jun 25 15:59 check_dns.yml.sample
-rw-rw-r--. 1 justin justin 476 Jun 25 15:59 vsphere.yml.sample
-rw-rw-r--. 1 justin justin 424 Jun 25 15:59 ovirt.yml.sample
-rw-rw-r--. 1 justin justin 1790 Jun 25 15:59 mirror_registry.yml.sample
-rw-rw-r--. 1 justin justin 166 Jun 25 15:59 libvirt.yml.sample
-rw-rw-r--. 1 justin justin 4558 Jun 25 16:09 mirror_registry.yml
-rw-rw-r--. 1 justin justin 130 Jun 25 16:43 dnsmasq.yml
-rw-rw-r--. 1 justin justin 266 Jun 25 16:44 dhcp_server.yml
-rw-rw-r--. 1 justin justin 126 Jun 25 16:46 dns_server.yml
-rw-rw-r--. 1 justin justin 41 Jun 25 16:48 dns_client.yml
-rw-rw-r--. 1 justin justin 458 Jun 25 16:54 ovirt.yml
$ ls -lrt files/common/
total 8
-rw-rw-r--. 1 justin justin 2435 Jun 25 15:59 install-config.yaml.sample
-rw-rw-r--. 1 justin justin 2434 Jun 25 16:56 install-config.yaml
But the only vsphere enty in any of the files that I'd edited is the one in the install-config.yaml that's commented out:
[justin@ales-helpernode openshift-auto-upi]$ grep vsphere inventory/group_vars/all/infra/*.yml
[justin@ales-helpernode openshift-auto-upi]$ grep vsphere files/common/*.yaml
# vsphere:
# vcenter: '{{ vsphere.vcenter_hostname }}'
# username: '{{ vsphere.vcenter_username }}'
# password: '{{ vsphere.vcenter_password }}'
# datacenter: '{{ vsphere.datacenter_name }}'
# defaultDatastore: '{{ vsphere.datastore_name }}'
Is there something I missed setting up in the inventory files?
@vap0rtranz Thanks for reporting this. I think I know where the problem is. The vsphere related lines in the install-config.yaml look like they are commented out but actually they are not. Ansible Jinja templating is still trying to replace the tokens '{{ vsphere.xxx }}' and failing as there is no vsphere variable defined.
Please, remove the vsphere lines in the install-config.yaml. That should make it work.
@noseka1 that worked. ty!