ansible-collections / ansible-collections/google.cloud
glcoud based authentication for ansible
- Dominant language
- Python
- Stars
- 105
- Forks
- 144
- Avg merge
- 5d 10h
- Merged PRs (30d)
- 4
Description
##### SUMMARY
this collection should work using one's environment when one has authenticated using gcloud, as the following documentation states (for terraform):
https://cloud.google.com/docs/terraform/authentication#local_dev_environment
This, actually, works with Terraform/OpenTofu.
It doesn't work with Ansible.
##### ISSUE TYPE
- Feature Idea
##### COMPONENT NAME
google_service_account or google_auth
##### ADDITIONAL INFORMATION
```yaml
plugin: google.cloud.gcp_compute
projects: xpc-25
hostnames:
- name
```
```bash
ansible -i hosts.gcp.yaml -m ansible.builtin.ping all
```
That should just work if `gcloud auth application-default login` was done beforehand.
Contributor guide
Research direction
Start by reproducing the issue with the google.cloud.gcp_compute inventory plugin and the provided Ansible ping command after running gcloud auth application-default login. Trace authentication through the google_service_account or google_auth components. Done means the inventory and ping command work using the local Google Cloud application-default credentials without additional configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ansible, google-cloud, python
- Domain
- authentication, cloud, devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100