Skip to content

Ansible on Ubuntu 16.04 LTS using Virtualenv

Disclaimer:

This is just a custom guide to install and configure Ansible  on UBUNTU 16.04 LTS, this could be more technical and advanced guide, if you do not understand or don’t know what you are doing, I kindly request you to take extreme caution. The components used here [Google Cloud Platform] are billable. SKYDEVOPS/I/WE do not take any responsibility if the guide causes any serious damage or issues, which you have to take full responsibility.

Installation Guide:

  1. Creating a instance on GCP – Compute Engine
  2. SSH access to the Cloud Machine
  3. Installing pre-requisites and dependencies
  4. creating virtual environment
  5. using PIP, install Ansible Control Host

Section-1: Creating VM on GCP – Compute Engine

Step-01: Create a standalone VM instance on compute engine

Create VM instance

Step-02: Enter the name, select Zone and type of machine

name zone and type

Step-03: Select the boot disk

Screen Shot 2018-04-30 at 4.17.44 PM

Step-04: Add firewall rules and start VM

Screen Shot 2018-04-30 at 4.18.00 PM

Section-2: SSH access and login to Ansible Control Host VM

Step-01: Login to VM

Screen Shot 2018-04-30 at 4.26.05 PM.png

Step-02: Update the cache and install Pre-Requisites

Screen Shot 2018-04-30 at 4.28.16 PM

Section-03: Pre-Requisites Installation

Step-01: Check if required softwares have been installed

Screen Shot 2018-04-30 at 4.29.31 PMScreen Shot 2018-04-30 at 4.29.57 PM

Step-02: Installing Virtualenv

Screen Shot 2018-04-30 at 4.32.01 PM.png

Section-04: Create Virtualenv and Activate

Step-01: Create a isolated virtual environment

Screen Shot 2018-04-30 at 4.33.47 PM.png

Step-02: Activate virtualenv

Screen Shot 2018-04-30 at 4.35.22 PM.png

Step-03: check if required softwares are available

Screen Shot 2018-04-30 at 4.37.00 PM.png

Screen Shot 2018-04-30 at 4.39.45 PM.png

Section-05: Install Ansible

Step-01: Installing Ansible in virtual environment

[code lang=bash]

$ pip install ansible

[/code]

Step-02: Check Ansible installation

Screen Shot 2018-04-30 at 4.42.53 PM

Step-03: Validating and verifying Ansible installation

Screen Shot 2018-04-30 at 4.43.49 PM

 

Shashi View All

-== Superman ==-

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: