Hi Kausal, Depending on the provider, you can use cloud-init to:
- Invoke an installation of Ansible - Download the Ansible code - Run the code from a local installed instance of Ansible - Rilindo > On Jul 23, 2022, at 10:22 AM, [email protected] <[email protected]> > wrote: > > Hi, > > Is there a way to execute Ansible playbooks in Terraform main.tf file? For > example I want to deploy nginx webserver inside GCP GCE VM Instance using > Ansible playbook once GCP GCE VM Instance is provisioned using Terraform. > > Please guide. Thanks in advance. > > Best Regards, > > Kaushal > > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/d3e76019-0911-4577-a9e4-85575eb885a5n%40googlegroups.com > > <https://groups.google.com/d/msgid/ansible-project/d3e76019-0911-4577-a9e4-85575eb885a5n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/3C809756-8BCE-4F7D-9E6B-E95AB4BF6361%40gmail.com.
