Ansible Install Package

Опубликовано: 06 Июль 2026
на канале: Otter Tech
11
0

⚙️ Ansible Level 2 - Day 2: Install Packages using Ansible | Ansible Series

Welcome to Day 2 of the Ansible Level 2 Series! In this lab, you'll learn how to automate software installation across multiple servers using Ansible and the Yum package management module.

📌 Lab Objective:
Create an Ansible playbook that installs a required package on all application servers simultaneously, ensuring consistent software configuration across the environment.

🛠️ Task Requirements:

Inventory File:
🔹 Location: /home/thor/playbook/inventory
🔹 Include all application servers

Playbook:
🔹 Location: /home/thor/playbook/playbook.yml

Package Details:
🔹 Package Name: logrotate
🔹 Package Manager: yum

Target Hosts:
🔹 App Server 1
🔹 App Server 2
🔹 App Server 3

Execution User:
🔹 thor

Validation Command:
🔹 ansible-playbook -i inventory playbook.yml

💻 What You’ll Configure & Verify:

🔹 Create Ansible inventory files
🔹 Configure managed hosts
🔹 Use the Ansible Yum module
🔹 Install packages on multiple servers
🔹 Ensure package state consistency
🔹 Execute playbooks as a non-root user
🔹 Verify successful installation
🔹 Automate software provisioning

📚 What You’ll Learn:

Ansible Yum Module
Package Management Automation
Inventory Management
Playbook Development
Software Provisioning
Configuration Management
Infrastructure Automation
Linux Administration

🌟 Why This Lab Matters:
Installing and managing software manually across multiple servers can be time-consuming and error-prone. Ansible enables administrators to automate package deployment, ensuring consistency, scalability, and faster infrastructure management.

🎯 Series: Ansible Level 2 Series
Advance your Ansible skills with hands-on automation labs and real-world infrastructure management scenarios.

🔔 Follow OtterTech for more Ansible, Docker, Kubernetes, Jenkins, AWS, Azure, Linux, Monitoring, and DevOps tutorials!

#Ansible #Automation #DevOps #Linux #Yum #PackageManagement #ConfigurationManagement #InfrastructureAsCode #Playbook #SystemAdministration #AnsibleLevel2 #OtterTech #CloudComputing