best practice for testing app with many versions

Hello, maybe you can help me with little query.

I have virtual lab based on vagrant and ansible.

All vms should be with same app installed but with different version number.

What’s the correct way to configure ansible to install a range of versions and keep vagrant know this version (for understable host name)?

Since I can’t pass args per host, how ansible can know which version needed?

The only way I found is to extract version from hostname with regex.

Do you have a better solution?

net

I don't know about vargrant, but there should be no issues in setting
a variable per host with the version using set_fact.

Thanks, I missed that..