lago-project / lago

Ad-hoc virtual testing environment framework
http://lago.readthedocs.org
GNU General Public License v2.0
47 stars 39 forks source link

ansible: Update how we generate inventory #814

Closed tinez closed 2 years ago

tinez commented 3 years ago

The way lago generates inventory for its prefix is outdated. This patches refreshes the algorithm to make the inventory compatible with newer ansible versions.

Example before:

[vm-type=ovirt-engine] lago-basic-suite-master-engine ansible_host=192.168.200.2 ansible_ssh_private_key_file=/some/key [vm-provider=local-libvirt] lago-basic-suite-master-engine ansible_host=192.168.200.2 ansible_ssh_private_key_file=/some/key lago-basic-suite-master-host-0 ansible_host=192.168.200.3 ansible_ssh_private_key_file=/some/key lago-basic-suite-master-host-1 ansible_host=192.168.200.4 ansible_ssh_private_key_file=/some/key [vm-type=ovirt-host] lago-basic-suite-master-host-0 ansible_host=192.168.200.3 ansible_ssh_private_key_file=/some/key lago-basic-suite-master-host-1 ansible_host=192.168.200.4 ansible_ssh_private_key_file=/some/key

and after:

[ovirt_engine] lago-basic-suite-master-engine ansible_host=192.168.200.2 ansible_ssh_private_key_file=/some/key [local_libvirt] lago-basic-suite-master-engine ansible_host=192.168.200.2 ansible_ssh_private_key_file=/some/key lago-basic-suite-master-host-0 ansible_host=192.168.200.3 ansible_ssh_private_key_file=/some/key lago-basic-suite-master-host-1 ansible_host=192.168.200.4 ansible_ssh_private_key_file=/some/key [ovirt_host] lago-basic-suite-master-host-0 ansible_host=192.168.200.3 ansible_ssh_private_key_file=/some/key lago-basic-suite-master-host-1 ansible_host=192.168.200.4 ansible_ssh_private_key_file=/some/key

Signed-off-by: Marcin Sobczyk msobczyk@redhat.com

michalskrivanek commented 3 years ago

LGTM

tinez commented 3 years ago

ci test

tinez commented 3 years ago

ci merge please

galitf commented 3 years ago

ci merge please

galitf commented 3 years ago

ci merge please