Hands-on Labs
Practice your Ansible skills with these guided exercises
Beginner Labs
EasyLab 1: First Playbook
Create your first Ansible playbook to manage a web server.
- Install Apache/Nginx
- Deploy a simple website
- Manage the service
Lab 2: Variables & Templates
Learn to use variables and Jinja2 templates.
- Define variables in playbooks
- Create configuration templates
- Deploy dynamic configs
Lab 3: Inventory Management
Work with static and dynamic inventory.
- Create inventory files
- Use groups and variables
- Target specific hosts
Intermediate Labs
MediumLab 4: Roles & Structure
Build reusable roles for common tasks.
- Create a role structure
- Use handlers and defaults
- Share roles between playbooks
Lab 5: Windows Automation
Manage Windows servers with WinRM.
- Configure WinRM connection
- Install Windows features
- Manage Windows services
Lab 6: Vault & Secrets
Secure sensitive data with Ansible Vault.
- Encrypt variables
- Use vault in playbooks
- Manage multiple vaults
Advanced Labs
HardLab 7: Cloud Deployment
Deploy infrastructure on AWS/Azure/GCP.
- Launch cloud instances
- Configure networking
- Use dynamic inventory
Lab 8: Custom Modules
Write your own Ansible modules.
- Create Python modules
- Handle parameters
- Return proper data
Lab 9: CI/CD Pipeline
Integrate Ansible with CI/CD tools.
- Set up automated testing
- Deploy with GitLab/Jenkins
- Implement rollback strategies
Advanced labs coming soon! Use the playground to practice these topics.
Real-World Scenarios
Complete end-to-end projects that simulate production environments
Scenario 1: LAMP Stack Deployment
Objective: Deploy a complete LAMP stack (Linux, Apache, MySQL, PHP)
What you'll do:
- Configure RHEL/Ubuntu servers
- Install and configure Apache
- Set up MySQL database
- Deploy PHP application
- Configure firewall and SELinux
Scenario 2: Multi-Tier Cloud App
Objective: Deploy a scalable application on AWS
What you'll do:
- Create VPC and subnets
- Launch EC2 instances
- Set up RDS database
- Configure load balancers
- Implement auto-scaling
Scenario 3: Windows Domain Setup
Objective: Automate Active Directory environment
What you'll do:
- Configure Windows Server
- Install Active Directory
- Create OUs and users
- Apply Group Policies
- Join computers to domain
Scenario 4: Kubernetes Deployment
Objective: Deploy and manage apps on Kubernetes
What you'll do:
- Set up Kubernetes cluster
- Deploy containerized apps
- Configure services and ingress
- Manage secrets and configs
- Implement rolling updates
Lab Tips
- Start with the playground to test your code
- Read the documentation for each topic before starting labs
- Use
--checkmode to test without making changes - Break complex tasks into smaller steps
- Use version control to track your progress
- Don't hesitate to experiment and learn from errors