Skip to content

A practical, hands-on guide to Ansible, featuring task-based exercises designed to build your skills one step at a time.

License

Notifications You must be signed in to change notification settings

VasudhaJha/step-by-step-ansible

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

step-by-step-ansible

🚀 A practical, hands-on guide to mastering Ansible through structured levels of exercises, challenges, and real-world examples.


Table of Contents

  1. Introduction
  2. Getting Started
  3. Levels Overview
  4. How to Use This Repository
  5. Contributing
  6. Resources

Introduction

Ansible is a powerful, open-source automation tool used for configuration management, application deployment, and orchestration. If you’ve ever felt overwhelmed by tutorials that jump around or if you’re stuck in "tutorial purgatory," this repository is for you.

This project will guide you through a task-based approach to learning Ansible, one step at a time. Each "level" builds on the previous one, covering key concepts and providing actionable tasks to solidify your understanding.


Getting Started

1. Prerequisites

  • Basic knowledge of Linux commands
  • Familiarity with SSH and text editors (like vim or nano)
  • Basic knowledge of Docker (since we will be using Docker containers for setting up our environment)

Levels Overview

Level 1: Getting Started with Ansible

  • Objective: Learn basic Ansible commands and test connections.

  • Topics Covered:

    • Installing Ansible
    • Understanding the control node and managed nodes
    • SSH key-based authentication
    • Ansible Inventory
  • Tasks:

    • Set Up Your Ansible Environment
    • Create your inventory file
    • Run your first ansible ping command

Level 2: Configuration Management (ansible.cfg)

  • Objective: Understand how to configure Ansible settings for ease of use.

  • Topics Covered:

    • Ansible Configuration file
  • Tasks:

    • Create a custom ansible.cfg file and run the ansible ping command

Level 3: Running Commands on Managed Nodes

  • Objective: Learn to execute commands on managed nodes using ad-hoc Ansible commands and Ansible modules.

  • Topics Covered:

    • Ad-hoc Commands
    • Ansible Modules
  • Tasks:

    • Check the system uptime on all managed nodes using ad-hoc commands.
    • Use the provided modules to create and delete a file on managed nodes.
    • Use an ad-hoc command to check the disk space usage on all managed nodes.
    • Run a command to display the memory usage on all managed nodes.

Level 4: Writing Playbooks

  • Objective: Understand how to create and execute playbooks for automating tasks.

  • Topics Covered:

    • Defining Playbook, Play, Task, and Modules
    • Verifying Playbooks
  • Tasks:

    • Basic File Management
    • Service Installation and Management
    • User and Group Management
    • Managing Package Versions

How to Use This Repository

  • Follow Each Level in Order: Each level builds on the previous one.
  • Test Your Knowledge: Try creating your own playbooks and modules after each level.
  • Share Your Progress: Create a branch for your solutions or raise issues for discussions.

Contributing

Contributions are welcome! Here’s how you can contribute:

  • Fork the repository.
  • Create a new branch (feature/my-improvement).
  • Submit a pull request (PR) with a clear description.

Resources


Happy automating! 🎉

About

A practical, hands-on guide to Ansible, featuring task-based exercises designed to build your skills one step at a time.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published