DevOps Classroom Series – Ansible – 8/Nov/2019

Ansible Workflow

  1. Make a list of all the commands/steps for deploying the applciation
  2. Execute them manually.
  3. Write a Ansible Playbook with the task for each command/step.


Spring-pet Clinic

  • This application is based out of java spring framework
  • Prereqs:
    • Java 8 should be installed.
  • Download the Spring-petclinic.jar file file from here
  • once application is downloaded execute the following command in the terminal
java -jar <path to spring-petclinic.jar>

Manual Steps

  • Deploy Spring Pet Clinic which by default runs on 8080 port
sudo apt-get update
sudo apt-cache search jdk | less
sudo apt-get install openjdk-8-jdk -y
java -version
java -jar spring-petclinic.jar

Student Courses Application

  • This is application written in Python Flask
  • Prereqs:
    • Python 3
    • pip-3
  • Steps
sudo apt-get update
sudo apt-get install python3 python3-pip git -y
git clone
cd StudentCoursesRestAPI
pip3 install -r requirements

Using Ansible For deployment of Sample Application

  • This can be done by writing Playbooks.
  • To Write effective Playbooks, we need to know
    • YAML
    • Modules
    • Tasks
    • Ansible-ENvironment Variables
    • Inventory
    • Ansible Configuration


  • Is much like JSON.
  • It is collection of name value pairs
  • Refer here for YAML Syntax

Leave a Reply

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

About continuous learner

devops & cloud enthusiastic learner