Create an Ansible Playbook which will dynamically load the variable file named same as OS_name and just by using the variable names we can Configure our target node.

Ashish Mangal
Mar 28, 2021

--

In this practical I would like to show you a demo of how to create Ansible Playbook which will dynamically load the variable file named same as OS_name and just by using the variable names we can Configure our target node.

Solution-:

Step1: Configure the ansible inventory file.

Step2: Create ansible playbook which dynamically pick the OS name-:

Here is the vars_file-:

Step3: Create a html file-:

Step4: Run the playbook using command -:

ansible-playbook {filename}.yml

Step5: After this you can check your result by going to browser and type IP/{filename}.

Thank you 😊😊

--

--

Ashish Mangal
Ashish Mangal

Written by Ashish Mangal

0 Followers

My name is Ashish Mangal. Currently I am pursuing B.tech in Electronics and Communication. A Technology Enthusiast!!!

No responses yet