Skip to content

Latest commit

Β 

History

69 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

30 Days of Ansible Bootcamp

License: MIT Ansible YouTube

A comprehensive, hands-on learning journey from Ansible fundamentals to advanced automation techniques.

Learn Ansible from zero to production-ready skills through a structured 30-day curriculum with video lessons, written documentation, and working code examples.

30 Days of Ansible

πŸ“Ί Video Course

This repository is the companion to the complete video series on the techbeatly YouTube Channel.

🎬 Watch the Full Ansible Course Playlist


🎯 Learning Objectives

By completing this 30-day bootcamp, you will:

  • βœ… Understand Ansible architecture and core concepts
  • βœ… Set up and manage Ansible lab environments
  • βœ… Write production-quality playbooks and roles
  • βœ… Master variables, facts, and dynamic inventories
  • βœ… Implement secrets management with Ansible Vault
  • βœ… Use advanced features: loops, conditionals, handlers, blocks
  • βœ… Create reusable roles and leverage Ansible Galaxy
  • βœ… Apply best practices for real-world automation
  • βœ… Build confidence to automate infrastructure at scale

πŸ“š Prerequisites

Required Knowledge

  • Linux basics: Command line navigation, file system, users/permissions
  • SSH fundamentals: How to connect to remote systems
  • YAML syntax: Basic understanding of YAML structure
  • Text editor: Familiarity with vim, nano, or VS Code

System Requirements

  • Control Node: Linux, macOS, or WSL2 (Windows)
  • Managed Nodes: 1-3 Linux systems (VMs, cloud instances, or containers)
  • Ansible Version: 2.9+ (Core 2.12+ recommended)
  • Python: 3.6+ on both control and managed nodes
  • Virtualization (optional): VirtualBox + Vagrant for local labs

Recommended Setup

  • VirtualBox 6.1+ and Vagrant 2.2+ (for Days 2-4 lab setup)
  • At least 4 GB RAM and 20 GB disk space for VMs
  • Stable internet connection for package downloads

πŸ“– How to Use This Repository

Self-Paced Learning

  1. Follow the daily sequence: Start with Day 01 and progress in order
  2. Watch the video first: Each day links to the corresponding video lesson
  3. Read the README: Detailed explanations and concepts for each topic
  4. Run the examples: Execute playbooks in your lab environment
  5. Experiment: Modify examples to deepen understanding

Structure of Each Day

Day-XX-Topic-Name/
β”œβ”€β”€ README.md           # Lesson content and explanations
β”œβ”€β”€ site.yaml          # Main example playbook
β”œβ”€β”€ ansible.cfg        # Ansible configuration for this lesson
β”œβ”€β”€ inventory          # Sample inventory file
└── [other files]      # Templates, variables, vault files, etc.

Running Examples

Navigate to the day's directory:

cd Day-09-Playbooks/

Run the playbook:

ansible-playbook site.yaml

Or with explicit configuration:

ansible-playbook -i inventory site.yaml

πŸ“… 30-Day Curriculum

Week 1: Setup & Fundamentals (Days 1-7)

Day Topic Description
Day 01 Introduction to Ansible What is Ansible, architecture, use cases
Day 02 Lab Environment Setup VirtualBox and Vagrant basics
Day 03 Ansible Lab with VirtualBox Creating test environments
Day 04 Vagrant Lab Creation Automated VM provisioning
Day 05 Installing Ansible Installation on various Linux distros
Day 06 Deploying Ansible Configuration and first commands
Day 07 Managing Inventory Static and dynamic inventory files

Week 2: Core Concepts (Days 8-14)

Day Topic Description
Day 08 Ad-Hoc Commands Quick one-liner automation
Day 09 Playbooks Fundamentals YAML, plays, tasks, and structure
Day 10 Privilege Management Remote users, become, sudo
Day 11 Finding Modules Module documentation and discovery
Day 12 Managing Variables Variable basics and scopes
Day 13 Extra Variables Runtime variables with -e flag
Day 14 Host & Group Variables Organizing variables with host_vars and group_vars

Week 3: Variables & Data (Days 15-21)

Day Topic Description
Day 15 Variable Arrays Lists, dictionaries, and complex data
Day 16 Registered Variables Capturing task output
Day 17 Ansible Facts System information gathering
Day 18 Custom Facts Creating custom local facts
Day 19 Magic Variables Built-in variables (hostvars, groups, etc.)
Day 20 Ansible Vault Encrypting sensitive data
Day 21 Using Secrets Vault in production playbooks

Week 4: Advanced Control (Days 22-28)

Day Topic Description
Day 22 Loops Iterating with loop, with_items
Day 23 Conditionals When statements and logic
Day 24 Handlers Event-driven task execution
Day 25 Task Failure Handling Error handling and recovery
Day 26 Blocks Grouping tasks with rescue/always
Day 27 Jinja2 Templates Dynamic file generation
Day 28 Roles Organizing playbooks into reusable components

Week 5: Optimization & Patterns (Days 29-30)

Day Topic Description
Day 29 Parallelism Serial execution, forks, strategies
Day 30 Host Patterns Advanced inventory targeting

πŸŽ“ Real-World Use Cases

Practical examples demonstrating real automation scenarios:


πŸ› οΈ Lab Environment Options

Option 1: Local VMs (VirtualBox + Vagrant)

Best for: Complete control, offline work, resource-intensive testing

# Install VirtualBox and Vagrant, then:
vagrant init ubuntu/focal64
vagrant up

Covered in: Days 2-4

Option 2: Cloud VMs

Best for: Production-like environments, team collaboration

  • AWS EC2, Azure VMs, Google Compute Engine
  • DigitalOcean Droplets, Linode instances
  • Use free tier options for learning

Option 3: Containers

Best for: Lightweight testing, quick iterations

docker run -d --name ansible-node1 ubuntu:20.04

Option 4: WSL2 (Windows Users)

Best for: Windows users wanting Linux experience

Install WSL2, then install Ansible within your Linux distribution.


πŸš€ Quick Start

1. Clone the Repository

git clone https://github.com/ginigangadharan/30-Days-of-Ansible-Bootcamp.git
cd 30-Days-of-Ansible-Bootcamp

2. Install Ansible

# On Ubuntu/Debian
sudo apt update
sudo apt install ansible

# On RHEL/CentOS/Fedora
sudo dnf install ansible

# Using pip
pip3 install ansible

3. Install Required Collections

ansible-galaxy collection install -r requirements.yml

4. Set Up Lab (Optional)

cd Day-04-Create-Ansible-Lab-using-Vagrant-and-VirtualBox/
vagrant up

5. Start Learning

cd Day-01-Introduction-to-Ansible/
cat README.md

πŸ“ Best Practices Taught

Throughout this bootcamp, you'll learn industry best practices:

  • βœ… Idempotency: Write playbooks that can run multiple times safely
  • βœ… FQCN: Use Fully Qualified Collection Names (ansible.builtin.*)
  • βœ… Variables: Proper scoping and organization
  • βœ… Security: Ansible Vault for secrets management
  • βœ… Error Handling: Graceful failure management
  • βœ… Roles: Modular, reusable automation code
  • βœ… Testing: Syntax checks and validation
  • βœ… Documentation: Self-documenting playbooks

🀝 Contributing

Contributions are welcome! Here's how you can help:

  1. Report Issues: Found a bug or error? Open an issue
  2. Suggest Improvements: Have ideas? Share them in discussions
  3. Submit Pull Requests:
    • Fix typos or errors
    • Add examples or use cases
    • Improve documentation
  4. Share Your Experience: Star ⭐ the repo if you find it helpful

Contribution Guidelines

  • Follow the existing structure and style
  • Test playbooks before submitting
  • Update READMEs to match code changes
  • Keep examples beginner-friendly

πŸ“š Additional Resources

Official Documentation

Community

Related Content


πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ‘¨β€πŸ’» Author

Gineesh Madapparambath


⭐ Support This Project

If you find this bootcamp helpful:

  • ⭐ Star this repository
  • πŸ“Ί Subscribe to techbeatly YouTube Channel
  • πŸ”” Enable notifications for new videos
  • πŸ’¬ Share with others learning Ansible
  • πŸ› Report issues to help improve the content

πŸŽ“ Completion Certificate

After completing all 30 days:

  1. Build a real-world automation project using what you've learned
  2. Share your project (optional) with the community
  3. Consider contributing back to this repository with your use cases

πŸ“Š Repository Stats

  • 30 Days of structured learning
  • 30+ Playbooks ready to run
  • 5 Real-world use cases
  • 100% Free and open source

Happy Learning! πŸš€

Remember: The best way to learn Ansible is by doing. Don't just read - experiment, break things, fix them, and build real automation!

Contributors

Languages