Skip to content

A collection of DevOps and Cloud Automation projects using Ansible, AWS, Docker, and other tools. This repository contains step-by-step projects that demonstrate infrastructure provisioning, configuration management, automation best practices, and scalable deployments.

Notifications You must be signed in to change notification settings

ITS-NAYAN/Ansible-Projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 

Repository files navigation


🌟 DevOps Projects with Ansible & AWS

This repository brings together five end-to-end automation projects using Ansible, AWS EC2, SSH, Docker, and Vault. Each project demonstrates a real-world use case in cloud automation.

πŸ”‘ 1. Control Node β†’ Managed Node via SSH Keys

Goal: Establish secure, passwordless SSH-based communication between your Control Node (Laptop) and a Managed Node (Ubuntu EC2).

Key Highlights:

  • Setup of ~/.ssh with correct permissions
  • Usage of AWS .pem key for initial access
  • Generation of SSH key pair (id_rsa, id_rsa.pub)
  • Public key copied to EC2 β†’ enabled passwordless login
  • Outcome: Future-ready authentication for Ansible automation

🌐 2. Install Apache & Deploy Custom Web Page (Ansible)

Goal: Automate web server setup with Ansible.

Key Highlights:

  • Inventory setup (inventory.ini) with EC2 public IP
  • Playbook installs & enables Apache2
  • Deploys a custom index.html to /var/www/html
  • Ensures idempotency β†’ safe re-runs without reconfiguration
  • Outcome: Fully automated deployment of a working Apache-hosted website

🐳 3. Install Docker on Ubuntu EC2 (Ansible Role)

Goal: Automate Docker installation using a community Ansible Galaxy role.

Key Highlights:

  • Inventory points to EC2 host with SSH key
  • Playbook applies bsmeding.docker role
  • Installs Docker engine & dependencies
  • Adds ubuntu user to docker group β†’ run containers without sudo
  • Verification: docker run hello-world successful
  • Outcome: Ready-to-use Docker-enabled EC2 instance

☁️ 4. Create EC2 Instance with Roles + Vault

Goal: Automate provisioning of a new EC2 instance with Ansible Roles and Vault-encrypted AWS credentials.

Key Highlights:

  • Structured roles-based project for clean reusability
  • AWS keys stored securely in group_vars/all/pass.yml (encrypted with Vault)
  • ec2_create.yaml playbook provisions a t2.micro EC2 with public IP
  • Vault password stored in vault.pass (excluded from Git)
  • Outcome: Secure, role-driven, automated EC2 creation workflow

⚑ 5. Multiple EC2 Creation with Roles + Vault

Goal: Scale cloud provisioning by automating the creation of multiple EC2 instances with one playbook.

Key Highlights:

  • Role structure extended to support ec2_count variable
  • Defaults define region, AMI, instance type, tags, etc.
  • Loop in main.yml creates multiple EC2s (ec2_count: 3 β†’ 3 instances)
  • AWS keys encrypted with Vault for security
  • Outcome: Scalable infrastructure automation β†’ launch 1 or 100 servers with just a config change

πŸ† Final Outcomes

By completing these projects, you have:

βœ… Mastered SSH key-based authentication for secure automation

βœ… Automated web server deployment with Ansible

βœ… Installed & verified Docker on EC2 using roles

βœ… Learned secure AWS key management with Vault

βœ… Scaled automation to handle multiple EC2 instances seamlessly


About

A collection of DevOps and Cloud Automation projects using Ansible, AWS, Docker, and other tools. This repository contains step-by-step projects that demonstrate infrastructure provisioning, configuration management, automation best practices, and scalable deployments.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages