I am executing the playbook from a VM which is on the same network as that of the private cloud sql instance, but the playbook is not able to connect to the instance. How can i achieve this? Kindly assist.
You’re targeting localhost, so it’s not clear where the inventory is used or where the playbook is failing. Assuming you can ssh manually to cloudsql-instance, you can run your playbook with -vvvv to compare the ssh command ansible is using with what you expect.
We cannot ssh into private google cloud sql instance. That is the challenge. Is there any way to do it? Any collection that supports connection mechanisms other than ssh?
I believe shell commands can be used, but i wanted to understand if there is any collection/plugin available for ssh connectivity to cloudSQL instance or via API calls.