On Sat, Jul 23, 2022 at 11:43 AM Rilindo Foster <[email protected]> wrote: > > 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
I've done this myself, especially to use consistent playbooks for docker and Terraform and other virtualization tools without a shared Ansible server. Not to *never* install the ansible package this way, only install "ansible-core", because the ansible package is a bulky conglomeration of roughly 100 add-on packages, none or nearly none of which are of any use to such a micro ansible setup. Installing the "ansible" package slows such installations quite a lot and soaks up space not needed for a VM or docker image at all. Nico Kadel-Garcia > 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]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/d3e76019-0911-4577-a9e4-85575eb885a5n%40googlegroups.com. > > > -- > 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. -- 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/CAOCN9ryrAau-CAcb9K_rYoWvj%2BCNO-vPZyp0oUxOyuQbd7tSUg%40mail.gmail.com.
