Free live webinar • November 21, 2026 • 9:30 AM CST   Register free →
2017–2027Celebrating Our 10th Year

Transform Your Career.
Engineer Your Future.

Build the skills to become an AI-Enabled DevSecOps & Cloud Engineer with 15 weeks of live training, hands-on labs and personal mentorship.

Coach AK in his DevOps learning studio
Coach AK | Ananth KannanSenior DevOps & SRE Architect • Founder, CoachDevOps
3,500+Students Trained
25+ YearsIT Experience
15 WeeksLive Training
70+Hands-on Labs

Master In-Demand Technologies

AWSAzureDockerKubernetesTerraformJenkinsGitHub ActionsAnsibleGitLab

AI-Enabled DevSecOps & Cloud Engineering Bootcamp

Next weekend batch: December 5, 2026
Saturday 9:30–11:30 AM CST • Sunday 10:30 AM–12:30 PM CST

Live classes, practical projects, personal mentorship and career preparation.

View Program Details →

Real Students. Real Success.

Career milestones shared by our students.

✓ Placement in an AI role
“The concepts you taught have improved my technical understanding and confidence.”
ManimaranJuly 2026 Bootcamp
✓ DevSecOps Engineer offer
“I want to sincerely thank you for your mentorship, training, and support.”
Femi AshayeCoachDevOps Alumni
✓ DevOps Engineer offer
“I got an offer for Devops engineer Last week and happy to inform you. I really appreciate you.”
EbenezerCoachDevOps Alumni
View All Success Stories →

Individual student experiences; employment is not guaranteed.

Ready to Take the Next Step?

Explore the program or get answers to your questions before enrolling.

Tuesday, December 27, 2022

Ansible playbook for Tomcat Installation on Ubuntu | Ansible Tomcat Playbook on Ubuntu 18.0.4/20.0.4

Ansible Playbook for installing Tomcat on Ubuntu 18.0.4

Pre-requisites:
Steps to setup SSH keys:
1. Login to Ansible management server/machine. Create SSH keys in Ansible host machine by executing the below command: (if you already have keys created, please skip this step)
ssh-keygen 

enter three times..now you will see keys successfully created.
2.  Execute the below command on Ansible management node and copy the public key content:
sudo cat ~/.ssh/id_rsa.pub

copy the above output.
3. Now login into target node where you want to install Tomcat, execute the below command to open the file
sudo vi /home/ubuntu/.ssh/authorized_keys
type shift A and then enter now 
    and paste the key in the above file. please do not delete any existing values in this file.

4. Now go back to Ansible mgmt node, do changes in /etc/ansible/hosts file to include the node you will be installing software. Make sure you add public or private IP address of target node as highlighted below in red color:
sudo vi /etc/ansible/hosts
[My_Group]  
xx.xx.xx.xx ansible_ssh_user=ubuntu ansible_ssh_private_key_file=~/.ssh/id_rsa  ansible_python_interpreter=/usr/bin/python3

5. Create a Playbook for setting up Tomcat 9

sudo vi installTomcat.yml

---
- hosts: My_Group
  tasks:
    - name: Task # 1 Update APT package manager repositories cache
      become: true
      apt:
        update_cache: yes
    - name: Task # 2 - Install Tomcat using Ansible
      become: yes
      apt:
        name: "{{ packages }}"
        state: present
      vars:
        packages:
           - tomcat9
           - tomcat9-examples
           - tomcat9-docs

6. Execute Playbook:

sudo ansible-playbook installTomcat.yml
This is the execution result of Ansible playbook.


Now access Tomcat on port 8080 in the target machine where you have installed it.



No comments:

Post a Comment