ansible/ansible — pull request #5689 by pgehres (2014-01-20 21:41:08+00:00)
Title: Adding the region to the output of the ec2 module's creation of a new in...

...stance.

Details: For our ec2 cloud, we require SSH to go through a bastion host. When spinning up new instances we need to delegate the wait_for ssh to the bastion host since port 22 is blocked from the internet. There is a bastion host for each region and thus we need to know an instance's region to vary between bastion hosts. The result of the spinup does include the placement, but that also include the AZ for the instance, which makes it unhelpful. Further, it does not appear to be simple to do a [:-1] operation in a jinja2 filter. Thusly, I do that very simply in the module output and make it available. Once you can run ec2_facts (after the instance has come up), this problem takes care of itself.