HiveBrain v1.2.0
Get Started
← Back to all entries
snippetModerate

How do you manage your inventory of spot instances on AWS with Ansible

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
youryouinstanceswithspotinventorymanageawshowansible

Problem

I am new to Ansible, with some experience in Chef. I am considering learn and use Ansible to manage environments.

I was wondering, what would be the best practice to manage inventory of AWS spot instances?

For example, when a spot instance is shut down the old IP is not relevant anymore in the inventory of hosts.

Are there any other alternative approaches for the use case of elastic environments?

Solution

You are looking for Dynamic Inventory

Please look into ec2.py and ec2.ini of Ansible, and also the Dynamic Inventory docs of Ansible are very good for understanding how to manage your AWS inventory.

Context

StackExchange DevOps Q#214, answer score: 15

Revisions (0)

No revisions yet.