Use One Playbook for different cases

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

I haven’t done this yet, but it looks like this is indeed possible. See Interactive input: prompts for more information. I hope this helps.

2 Likes

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

2 Likes

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

1 Like

Thanks to all for your quick respond. <3

2 Likes