Ansible - Environment Setup


Advertisements

In this chapter, we will learn about the environment setup of Ansible.

Installation Process

Mainly, there are two types of machines when we talk about deployment −

  • Control machine − Machine from where we can manage other machines.

  • Remote machine − Machines which are handled/controlled by control machine.

There can be multiple remote machines which are handled by one control machine. So, for managing remote machines we have to install Ansible on control machine.

Control Machine Requirements

Ansible can be run from any machine with Python 2 (versions 2.6 or 2.7) or Python 3 (versions 3.5 and higher) installed.

Note − Windows does not support control machine.

By default, Ansible uses ssh to manage remote machine.

Ansible does not add any database. It does not require any daemons to start or keep it running. While managing remote machines, Ansible does not leave any software installed or running on them. Hence, there is no question of how to upgrade it when moving to a new version.

Ansible can be installed on control machine which have above mentioned requirements in different ways. You can install the latest release through Apt, yum, pkg, pip, OpenCSW, pacman, etc.

Installation through Apt on Ubuntu Machine

For installing Ansible you have to configure PPA on your machine. For this, you have to run the following line of code −

$ sudo apt-get update 
$ sudo apt-get install software-properties-common 
$ sudo apt-add-repository ppa:ansible/ansible $ sudo apt-get update 
$ sudo apt-get install ansible

After running the above line of code, you are ready to manage remote machines through Ansible. Just run Ansible–version to check the version and just to check whether Ansible was installed properly or not.

Useful Video Courses


Video

DevOps Project: DevOps CI/CD Pipeline with Jenkins Ansible Docker Kubernetes on AWS

Best Seller

41 Lectures 5 hours

AR Shankar

Video

Master Ansible ( Fastest Way Ever )

11 Lectures 58 mins

Musab Zayadneh

Video

Automation with Ansible Playbooks

59 Lectures 15.5 hours

Narendra P

Video

Ansible for Absolute Beginners - Hands-on - DevOps

11 Lectures 1 hours

Sagar Mehta

Video

Ansible for an Absolute Beginner - Automation - DevOps

39 Lectures 4 hours

Vikas Yadav

Video

Ansible - Getting Started

4 Lectures 3.5 hours

GreyCampus Inc.

Advertisements