Skip to content

tarun0609/Lucidity

Repository files navigation

Explanation 

AWS Account Details:

Added a variable aws_accounts to store the details of AWS accounts (account ID, role name, and region).

Assume Role in Accounts:

The playbook assumes a role in each AWS account to gain access using sts_assume_role.

List EC2 Instances:

Retrieves the list of EC2 instances from each account using the credentials from the assumed roles.

Disk Utilization Fetching:

Uses the shell module to fetch disk utilization on each instance and aggregates the data.

Data Aggregation and Storage:

Aggregates the data into a JSON file and uploads it to an S3 bucket. Also stores the data in an RDS database.

CloudWatch Alarm Creation:

Creates a CloudWatch alarm to monitor disk usage and sends notifications via SNS.

Running the Playbook
Install Required Collections and Plugins:

sh
ansible-galaxy collection install amazon.aws
Execute the Playbook:

sh
ansible-playbook -i aws_ec2.yaml playbook.yml

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published