ansible / terraform-provider-ansible

community terraform provider for ansible
https://registry.terraform.io/providers/ansible/ansible/latest
GNU General Public License v3.0
183 stars 42 forks source link

How to use dynamic inventory? #90

Closed dhilgarth closed 4 months ago

dhilgarth commented 4 months ago

I'm having a hard time getting this provider to work.

I'm trying to run the AWS example but it fails when running the playbook. My ansible version 2.16.3 on Debian Bookworm installed via pip install ansible seems to not know the inventory plugin cloud.terraform.terraform_provider. Also, the official plugin list is missing it as well.

So how do I actually get / install / use this plugin? Or what I actually want to know: How can I run my playbook with the inventory created from the Terraform ansible_host and ansible_group resources?

dhilgarth commented 4 months ago

In case anyone else has this problem. The solution is to run ansible-galaxy collection install cloud.terraform