FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
LAB: 2 EC2 Servers + Group-Based Deployment
How-ToDevOps

LAB: 2 EC2 Servers + Group-Based Deployment

via Dev.to DevOpsAisalkyn Aidarova1mo ago

Objective Inventory groups Deploy different software to different servers Run playbook against specific group Use variables per group Understand real-world environment separation Architecture Control Node (Mac) ↓ SSH EC2-1 → Web Server EC2-2 → DB Server Step 1 — Launch 2 EC2 Instances Both: Ubuntu 22.04 Port 22 open Port 80 open (for web) Same key pair Example IPs: Web: 3.141.22.178 DB: 3.141.25.200 Step 2 — Create Inventory with Groups Edit inventory.ini [web] 3.141.22.178 ansible_user = ubuntu ansible_ssh_private_key_file=~/Downloads/pem/key.pem [db] 3.141.25.200 ansible_user = ubuntu ansible_ssh_private_key_file=~/Downloads/pem/key.pem Test: ansible all -i inventory.ini -m ping Both should return pong. Step 3 — Create Group-Based Playbook Create: vim multi-server.yml Paste: - name : Configure Web Server hosts : web become : yes tasks : - name : Install nginx apt : name : nginx state : present - name : Start nginx service : name : nginx state : started enabled : yes - name : Configur

Continue reading on Dev.to DevOps

Opens in a new tab

Read Full Article
18 views

Related Articles

Building an MCP Server for Your Own Tools
How-To

Building an MCP Server for Your Own Tools

Medium Programming • 5d ago

[MM’s] Boot Notes — The Day Zero Blueprint — Test Smarter on Day One
How-To

[MM’s] Boot Notes — The Day Zero Blueprint — Test Smarter on Day One

Medium Programming • 5d ago

RHAPSODY OF REALITIES - 26TH MARCH 2026
"In Nehemiah’s day, as the people built the wall of…
How-To

RHAPSODY OF REALITIES - 26TH MARCH 2026 "In Nehemiah’s day, as the people built the wall of…

Medium Programming • 5d ago

How to Actually Make Money with a "Free" App
How-To

How to Actually Make Money with a "Free" App

Medium Programming • 5d ago

How-To

Building a Runtime with QuickJS

Lobsters • 5d ago

Discover More Articles