boltops-tools / terraspace

Terraspace: The Terraform Framework
https://terraspace.cloud
Apache License 2.0
678 stars 46 forks source link

How to use ansible with Terraspace ? #353

Open janfickler opened 3 months ago

janfickler commented 3 months ago

Hi,

i am currently struggle with the integration of Ansible in Terraform using Terraspace.

in a normal terraform project i use the ansible terraform provider for executing ansible roles / collections - https://registry.terraform.io/providers/ansible/ansible/latest/docs

my problem is using terraspace with ansible it seems that the roles which i want to use can´t be found.

Terraspace loads the the complete code into ".terraspacecache", but it seems to be that the within that ansible is then not even more able to find his roles and collections correctly.

i tried that inside a stack without sucess. Then i also tried it to have the ansible config / roles outside the stack in a folder on the toplevel of the terraspace project and dedicated paths to the folders which holding the ansible-roles/collections.

Is there anything what i do wrong ?

or did i have to add the ansible roles / collections to the lib-folder ?

Or is there any other way to use ansible with terraform + terraspace ?

I would be very grateful for help. thx.

kind regards