🎇Above is the ansible playbook. Here if you see in the vars_files, i haven’t written directly the file name i want to include, in fact, gave a variable and hence we took advantage of ansible_facts and this variable would retrieve os name, and we have written the packages, etc in a file with giving the same name as os name in the same folder. As shown below, we have 2 files RedHat.yml and Ubuntu.yml and these are also the os name. See below👇

First add a role path in your config file of ansible. I have added /ws20. so, this folder would contain all the roles that i would create.

What are neural networks ?

Deep learning or neural networks in a leemman term can be said the advance of machine learning. Neural networks are a set of algorithms, they are designed to mimic the human brain, that is designed to recognize patterns. They interpret data through a form of machine perception by labeling or clustering raw input data.

Let’s take a moment to consider the human brain. Made up of a network of neurons, the brain is a very complex structure.

It’s capable of quickly assessing and understanding the context of numerous different situations. Computers struggle to react to situations in a similar way…

What is Machine Learning ?👲

Machine Learning is the science of getting computers to learn and act like humans do, and improve their learning over time in autonomous fashion, by feeding them data and information in the form of observations and real-world interactions.

🍤Machine Learning has different different definitions from different different universities/places but all means same in one or other way. some examples are below to understand more clearly that what is machine learning and what it do:🍤

  1. “Machine Learning at its most basic is the practice of using algorithms to parse data, learn from it, and then make a determination or prediction about…

Procedure- First we will write a playbook which will configure haproxy in a system and two backend servers. to add any new server we will update the conf file manually

Then we will enhance our playbook that will automatically/dynamically take ip of the new backend server added.

Let’ start

Below is an ansible playbook which will configure haproxy and web server, you just have to give the IPs for the respective systems.

Ansible has become the most famous tool for the industries now. It has solved lots of industry use cases by seamlessly uniting workflow orchestration with configuration management, provisioning, and application deployment in one easy-to-use and deploy platform.

one of the reason of its popularity is its simplicity to use, anyone can learn very easily, it is powerful and provides agentless automation with solving almost every use case. one of the company that it helped a lot is schwarz group.

The Schwarz Group is a German, privately owned retail group that operates more than 12,500 stores globally. It has two retail…

Prerequisites- Ansible installed in system

First put your ip in the inventory file of the system that you want to configure

If we talk about ansible, it works on idempotence nature means it runs the things only when it is required. for eg- if we are using file module for creating a file/folder, then if the folder is not present it will run, otherwise not. Means it first checks the state of the system. Hence this saves the resources like ram and cpu also.

Now lets see a scenario👇

we have an ansible playbook which is configuring apache httpd web server.

prerequisites- Ansible installed on your system

if not installed you can install it using the command pip3 install ansible. or you can also use yum, first configure the epel and then use yum install ansible(this one is better way)

🔥Now let’s see how to write ansible playbook.🔥

First configure the inventory file with the IPs that you want to use as namenode and datanode/slave. Below is my inventory where ip 101 is master and 110 is of slave. see below👇

So, we must have docker installed on our system for this. If you don’t know then read the below story in which i showed how to configure docker on redhat 8.👇


Below is my redhat 8 system with docker in it. I have some images in it also of centos and httpd. let’s install the python interpreter in using centos image.

NOTE- if you don’t have the image then you can install using the command docker pull centos as shown below👇

Deepanshu Yadav

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store