How to Install Ansible and Manage Servers

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/how-to-install-ansible-and-manage-servers/
PINTEREST
PINTEREST
INSTAGRAM

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 a enterprise company there may be 10 – 100 web servers for the departments different needs.

Here one of the most important thing 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 ip address as a group named poftut_servers

Add 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.

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

LEARN MORE  How To Start, Stop, Restart Networking On Linux?

Now try again same simple command.

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

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

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/how-to-install-ansible-and-manage-servers/
PINTEREST
PINTEREST
INSTAGRAM