Ansible AWS Inventory
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:
- set up an Ansible playbook to spin up multiple EC2 instances and an RDS instance.
- 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?