How to Install Ansible and Manage Servers? – POFTUT

How to Install Ansible and Manage Servers?

Enterprise IT needs more than traditional IT tools. Because there are different architecture and styles in IT infrastructure. In a small company one web server is enough for all but in an enterprise company, there may be 10 – 100 web servers for the department’s different needs. Here one of the most important things is orchestration and management of the infrastructure simple and confident way. Ansible is a tool that gives the ability to the server admins or devops.

Installing

We will use Fedora Server 24 for this tutorial and our architecture is 64 bit. 1 GB is enough for simple tests but keep in mind that there is more if your work is complex. We have two servers named poftut1 and poftut2. We will manage from poftut1 the two servers.

Install nano for editing Ansible hosts file.

Open and add servers with an IP address as a group named poftut_servers

Add the following lines. This file is called inventory in Ansible terminology.

Start Simple

We have completed installation and setup. Now we will try to access our servers by using their group name.

We can not run hostname command here. Because we have to provide a password for the current user or set up key-based authentication for ssh. Second is more secure.

Now try again same simple command.

LEARN MORE  10 Things To Do After Fedora Installation

Now create a directory in all servers in our poftut_servers group.

It seems success but we can make a double check with Ansible by listing the directory.

How to Install Ansible and Manage Servers? Infographic

How to Install Ansible and Manage Servers? Infographic

How to Install Ansible and Manage Servers? Infographic

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Enjoy this blog? Please spread the word :)