My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

Ansible AWS Inventory

Albert Salim's photo
Albert Salim
·Aug 4, 2016

I'm working towards having an Ansible playbook to automatically set up AWS EC2 instances, an RDS database and deploy a Rails app to the EC2 instances.

I have managed to do the following:

  1. set up an Ansible playbook to spin up multiple EC2 instances and an RDS instance.
  2. set up an Ansible playbook to deploy a Rails app to EC2 using Ansible groups

Currently I still need to manually update the inventory file for step #2 based on the IP addresses that AWS provided after step #1.

How can I combine the 2 playbooks into 1 by automatically using the IP addresses given by AWS in the inventory file?