Using Variable file named same as OS name will configure webserver on it.

I have used instances of aws as my target instance which was running on Amazon Linux Operating system. So OS same is Amazon.

I have created Amazon.yml file which containes the variable which are required for the configuration of web-server. Below is the image of code:

Variable file

I created one playbook named LV.yml for configuring the tasks. Below is the picture of the code.


Output of the code:

Find link to my demo video: