nbering / terraform-provider-ansible

"Logical" provider for integrating with an Ansible Dynamic Inventory script.
https://nbering.github.io/terraform-provider-ansible/
Mozilla Public License 2.0
329 stars 64 forks source link

Creating the host list from modules #9

Closed prandelicious closed 6 years ago

prandelicious commented 6 years ago

I have a bunch of EC2 instances created via a module. I can get the list of internal IP addresses of these instances. How do I declare this in the ansible_host resource?

nbering commented 6 years ago

The ansible_host resource can exist inside the module, and the inventory script will still be able to find it. If it doesn't that would be a bug.

If you don't want the ansible_host to be inside the module, then you will need to configure an output from the module.

Does this answer your question?

nbering commented 6 years ago

@prandelicious, if this is still relevant to you, just provide more information and I'll re-open.