2017–2027Celebrating Our 10th Year

Transform Your Career.
Engineer Your Future.

15 weeks of live AI-enabled DevSecOps and cloud training with Coach AK. Build skills through 70+ hands-on labs.

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
FEATURED HANDS-ON LAB

Build Your First AI Agent for DevOps

Learn how to troubleshoot Jenkins pipelines using Python, OpenAI and intelligent tool calling.

  • Real-world Jenkins troubleshooting
  • AI agent architecture and tool integration
  • Step-by-step Python implementation
  • Free hands-on tutorial with code
Read the Tutorial →

Build an AI Agent for DevOps

Jenkins troubleshooting with Python & OpenAI

1. The problemJenkins build failed
2. AI agentRetrieve logs
Analyze evidence
3. The outcomeSuggested fix
Engineer validates
Python · Jenkins · OpenAI · Streamlit

Latest Tutorials & Hands-On Labs

Build real-world skills with our newest technical tutorials.

Explore All Tutorials →

Master In-Demand Technologies

AI-Enabled DevSecOps & Cloud Engineering Bootcamp

Next weekend batch: December 12, 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.

Saturday, February 10, 2024

Ansible Role for Java 21 Installation on Ubuntu - Ansible Role to Install Java on Ubuntu 24.0.4

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_ed25519.pub

copy the above output.
3. Now login to target node, 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 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_ed25519  ansible_python_interpreter=/usr/bin/python3

5. let's make sure Ansible Control node is able to connect to target node

ansible -m ping all

ansible all -a "whoami"



6. make changes in Ansible Role as given below,
cd ~/roles

sudo vi aws-infra-role/tasks/installJava21.yml

---
    - name: Task - 1 Update APT package manager repositories cache
      become: true
      apt:
        update_cache: yes
    - name: Task -2 Install Java 21 using Ansible
      become: yes
      apt:
        name: "{{ packages }}"
        state: present
      vars:
        packages:
           - openjdk-21-jdk

7. Create Ansible main playbook

sudo vi aws-infra-role/setup-jenkins.yml
---
# This Playbook install Java 21 on target node

- hosts: My_Group
  gather_facts: False
  tags: jenkins creation

  tasks:
  - name: Import Java 21 installation tasks
    ansible.builtin.import_tasks: tasks/installJava21.yml

8. Execute Ansible Role
ansible-playbook aws-infra-role/setup-jenkins.yml

now after successfully executing, enter below command to make sure Java is installed in target node:

java -version
openjdk version "21.x.x" 
OpenJDK Runtime Environment (build 11.0.7+10-post-Ubuntu-2ubuntu218.04)
OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Ubuntu-2ubuntu218.04, mixed mode, sharing)

Join the Discussion

Have a question about this tutorial or need help with a lab? Share your questions and feedback below.

Post a Comment