14

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?

Dawny33
  • 2,816
  • 3
  • 24
  • 62
Berlin
  • 780
  • 6
  • 15

1 Answers1

15

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.

Dawny33
  • 2,816
  • 3
  • 24
  • 62