# Use One Playbook for different cases

**URL:** <https://forum.ansible.com/t/use-one-playbook-for-different-cases/203>\
**Category:** Get Help\
**Tags:** vmware, playbook, help, awx\
**Created:** [August 30, 2023, 7:33am UTC](https://forum.ansible.com/t/use-one-playbook-for-different-cases/203 "2023-08-30T07:33:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marvin](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@Marvin](https://forum.ansible.com/u/Marvin)\
**Post date:** [August 30, 2023, 7:33am UTC](https://forum.ansible.com/t/use-one-playbook-for-different-cases/203/1 "2023-08-30T07:33:41Z")

</div>

Hey Guys, im new to Ansible and glad to find this community.  
My name is Marvin and i work for now one with Ansible.  
I have a special use case for Ansible. I want to write a Playbook with different tasks to deploy a new VM on VMware. But every new VM is slightly different. I want to use vars and every time someone start the playbook these vars got asked maybe as popups or as fields in commandline, … i would be happy if someone can give me a hint how to write a python script or some one else for this “problem”.  
Greetings

---

<div class="post-metadata">

**Author:** ![mariolenz](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mariolenz/32/108_2.png) [@mariolenz](https://forum.ansible.com/u/mariolenz)\
**Post date:** [August 30, 2023, 12:38pm UTC](https://forum.ansible.com/t/use-one-playbook-for-different-cases/203/2 "2023-08-30T12:38:12Z")

</div>

I haven’t done this yet, but it looks like this is indeed possible. See [Interactive input: prompts](https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_prompts.html) for more information. I hope this helps.

---

<div class="post-metadata">

**Author:** ![Leo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/leo/32/23_2.png) [@Leo](https://forum.ansible.com/u/Leo)\
**Post date:** [August 30, 2023, 3:23pm UTC](https://forum.ansible.com/t/use-one-playbook-for-different-cases/203/3 "2023-08-30T15:23:42Z")

</div>

Hi and welcome @Marvin!

Adding to what @mariolenz mentioned, if you are using AWX, @IPvSean just posted a short guide on how to use Surveys, which you can also use to accomplish it.

Here is the post: [Understanding Ansible Surveys](http://forum.ansible.com/t/understanding-ansible-surveys/211)

---

<div class="post-metadata">

**Author:** ![gwmngilfen](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/gwmngilfen/32/6_2.png) [@gwmngilfen](https://forum.ansible.com/u/gwmngilfen)\
**Post date:** [August 31, 2023, 8:31am UTC](https://forum.ansible.com/t/use-one-playbook-for-different-cases/203/4 "2023-08-31T08:31:20Z")

</div>

Some good answers here, thanks folks. If either of those helped @Marvin, please do hit the Solved ✔ button on that post, it helps others in the future!

---

<div class="post-metadata">

**Author:** ![Marvin](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@Marvin](https://forum.ansible.com/u/Marvin)\
**Post date:** [September 1, 2023, 7:07am UTC](https://forum.ansible.com/t/use-one-playbook-for-different-cases/203/5 "2023-09-01T07:07:42Z")

</div>

Thanks to all for your quick respond. \<3
