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.
Goal: Establish secure, passwordless SSH-based communication between your Control Node (Laptop) and a Managed Node (Ubuntu EC2).
Key Highlights:
- Setup of
~/.sshwith correct permissions - Usage of AWS
.pemkey 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
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.htmlto/var/www/html - Ensures idempotency β safe re-runs without reconfiguration
- Outcome: Fully automated deployment of a working Apache-hosted website
Goal: Automate Docker installation using a community Ansible Galaxy role.
Key Highlights:
- Inventory points to EC2 host with SSH key
- Playbook applies
bsmeding.dockerrole - Installs Docker engine & dependencies
- Adds
ubuntuuser todockergroup β run containers withoutsudo - Verification:
docker run hello-worldsuccessful - Outcome: Ready-to-use Docker-enabled EC2 instance
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.yamlplaybook 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
Goal: Scale cloud provisioning by automating the creation of multiple EC2 instances with one playbook.
Key Highlights:
- Role structure extended to support
ec2_countvariable - Defaults define region, AMI, instance type, tags, etc.
- Loop in
main.ymlcreates 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
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