Saturday, April 25, 2020

Install Ansible on Ubuntu | How to setup Ansible on AWS Ubuntu 22.0.4 instance | Ansible install on Ubuntu EC2 instance

Ansible is #1 configuration management tool. It can also be used for infrastructure provisioning as well. or You can use Ansible in combination of Terraform which can take care of infra automation and Ansible can do configuration management.
 
Ansible Architecture:
 



The best way to install Ansible for Ubuntu is to add the project's PPA (personal package archive) to your system. You also would need Boto framework for provisioning resources in AWS cloud.

Pre-requisites:
Create new Ubuntu EC2 instance for installing Ansible, just open port 22.

Change Host Name to AnsibleMgmtNode
sudo hostnamectl set-hostname 
AnsibleMgmtNode

Update Repository

sudo apt update



Install Ansible:
sudo apt install -y ansible


Install Python-pip3:
sudo apt install python3-pip -y
 ( this is just comment -  pip is package manager for Python)



Press tab and Enter on OK

Install Boto Framework - AWS SDK
sudo pip3 install boto boto3

Ansible will access AWS resources using boto SDK.

pip list boto | grep boto
(the above command should display below output)
You can ignore warning in red color.

 
ansible --version


Watch here for the steps to setup Ansible on Ubuntu:

4 comments:

  1. Today, I was just browsing along and came upon your blog. Just wanted to say good blog and this article helped me a lot, due to which I have found exactly I was looking. muskegon marijuana dispensary

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. anyone can help me to write ansible script for mongo db cluster

    ReplyDelete

How to Configure GitHub Advanced Security for Azure DevOps | How to Perform Security scan for Azure Repos using GitHub Advanced Security

GitHub Advanced Security for Azure DevOps brings the  secret scanning, dependency scanning  and  CodeQL code scanning  solutions already ava...