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

Add support for separate resources to assign individual host or group vars. #18

Closed nbering closed 5 years ago

nbering commented 5 years ago

Closes #4.

A large portion of this feature will need to be handled in the inventory script, as it will need to be merged into the final inventory json.

A priority level may need to be added to the resource to help the inventory script determine value precedence if there are multiple resources with the same inventory_hostname and key. It would seem reasonable that this could happen when using terraform module structures, which can be somewhat inflexible once implemented, and wanting to override a variable in a specific case.

nbering commented 5 years ago

This is probably enough work for one weekend. Will open a new issue for the priority property idea. More work needs to be done with the inventory script before I can support it anyway.