How to use ansible-semaphore with terraform #889
-
Dear, Thanks for your amazing tools you have done a nice works. After read documentation and test the demo it is unclear to me how to use terraform and ansible together through semaphore. Thanks for your highlights Have a nice day |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi @bioinfornatics, Semaphore works only with Ansible. Please provide more details about your use case. |
Beta Was this translation helpful? Give feedback.
-
@bioinfornatics you can create an inventory script that Semephore can parse to gather a list of hosts. The general Ansible documentation is here: Here is a more specific example for Terraform on GCP: Hope that helps. |
Beta Was this translation helpful? Give feedback.
-
@bioinfornatics Terraform available in Cloud and Premium version of Semaphore. |
Beta Was this translation helpful? Give feedback.
@bioinfornatics you can create an inventory script that Semephore can parse to gather a list of hosts.
I use Foreman to house my inventory and I have a Python inventory script to gather the hosts from Forman and present them to Semaphore, which is stored in my Ansible playbook as
inventories/production/hosts
.The general Ansible documentation is here:
https://docs.ansible.com/ansible/latest/user_guide/intro_dynamic_inventory.html
Here is a more specific example for Terraform on GCP:
https://www.percona.com/blog/2021/06/01/how-to-generate-an-ansible-inventory-with-terraform/
Hope that helps.