ansible-community / ansible-community/molecule-plugins

GCE plugin fails when creating windows hosts if using application default auth

Open
#212 2 comments 0 reactions 0 assignees View on GitHub
gce
Dominant language
Python
Stars
164
Forks
113
Avg merge
4d 20h
Merged PRs (30d)
1

Description

The 'Prepare Windows User' will set the env variable `GOOGLE_APPLICATION_CREDENTIALS` to an empty string when the `molecule_yml.driver.service_account_file`/`GCP_SERVICE_ACCOUNT_FILE` is undefined (which it commonly is when using `auth_kind: application`). windows_auth.py then fails to find the application credentials json file since GOOGLE_APPLICATION_CREDENTIALS is `""`

https://github.com/ansible-community/molecule-plugins/blob/196ed1eb034ebf343a270102179c98e84f49eb71/src/molecule_plugins/gce/playbooks/tasks/create_windows_instance.yml#L64C44-L64C44

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at src/molecule_plugins/gce/playbooks/tasks/create_windows_instance.yml around line 64, then inspect windows_auth.py and the application-default authentication path. Reproduce a Windows host creation with auth_kind: application and verify that an undefined service account file does not prevent the application credentials JSON from being found.

Written by the indexing model from the issue text.

Assessment

Tech stack
ansible, gcp, python
Domain
cloud
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.