Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GCE] Support default credentials #22723

Merged
merged 1 commit into from Mar 17, 2017
Merged

Conversation

supertom
Copy link
Contributor

@supertom supertom commented Mar 16, 2017

SUMMARY

When running on GCE, if the user doesn't specify credentials, we should fall back to Application Default Credentials. This change allows that to happen.

ISSUE TYPE
  • Bugfix Pull Request
  • Docs Pull Request
COMPONENT NAME

GCE

ANSIBLE VERSION
ansible 2.4.0 (ans-auth 342ef611b2) last updated 2017/03/16 22:49:40 (GMT +000)
  config file = /home/supertom/.ansible.cfg
  configured module search path = Default w/o overrides
  python version = 2.7.9 (default, Mar  1 2015, 12:57:24) [GCC 4.9.2]

ADDITIONAL INFORMATION

Add support for default credentials. Practically, this means that a playbook creator would not have to specify the service_account_email or credentials_file Ansible parameters.

Default Credentials only work when running on Google Cloud Platform. The 'project_id' is still required.

A test has been added to trigger this condition.

TESTING

Be sure of the following:

  • No GCE_ or GOOGLE_ env vars set
  • No secrets.py file in your path
  • Your Ansible module does not contain service_account_email, pem_file or credentials_file parameters.

/cc @ryansb

Add support for default credentials. Practically, this means that a playbook creator would not have to specify the service_account_email or credentials_file Ansible parameters.

Default Credentials only work when running on Google Cloud Platform. The 'project_id' is still required.

A test has been added to trigger this condition.
@ansibot ansibot added affects_2.4 This issue/PR affects Ansible v2.4 bugfix_pull_request c:module_utils/ needs_triage Needs a first human triage before being processed. labels Mar 16, 2017
@nitzmahone nitzmahone removed the needs_triage Needs a first human triage before being processed. label Mar 17, 2017
@nitzmahone nitzmahone merged commit f5f6cf4 into ansible:devel Mar 17, 2017
sayap pushed a commit to KMK-ONLINE/ansible that referenced this pull request May 10, 2017
Add support for default credentials. Practically, this means that a playbook creator would not have to specify the service_account_email or credentials_file Ansible parameters.

Default Credentials only work when running on Google Cloud Platform. The 'project_id' is still required.

A test has been added to trigger this condition.
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bugfix_pull_request labels Mar 6, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.4 This issue/PR affects Ansible v2.4 bug This issue/PR relates to a bug. c:module_utils/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants