# best practice for testing app with many versions

**URL:** <https://forum.ansible.com/t/best-practice-for-testing-app-with-many-versions/16943>\
**Category:** Ansible Project\
**Created:** [December 2, 2014, 9:37pm UTC](https://forum.ansible.com/t/best-practice-for-testing-app-with-many-versions/16943 "2014-12-02T21:37:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Netanel\_Maman](https://avatars.discourse-cdn.com/v4/letter/n/da6949/32.png) [@Netanel\_Maman](https://forum.ansible.com/u/Netanel_Maman)\
**Post date:** [December 2, 2014, 9:37pm UTC](https://forum.ansible.com/t/best-practice-for-testing-app-with-many-versions/16943/1 "2014-12-02T21:37:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [December 2, 2014, 11:35pm UTC](https://forum.ansible.com/t/best-practice-for-testing-app-with-many-versions/16943/2 "2014-12-02T23:35:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Netanel\_Maman](https://avatars.discourse-cdn.com/v4/letter/n/da6949/32.png) [@Netanel\_Maman](https://forum.ansible.com/u/Netanel_Maman)\
**Post date:** [December 15, 2014, 8:04am UTC](https://forum.ansible.com/t/best-practice-for-testing-app-with-many-versions/16943/3 "2014-12-15T08:04:57Z")

</div>

Thanks, I missed that..
