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

Azure: added auth_source to override the source of the credentials #35213

Merged
merged 6 commits into from
Jan 23, 2018

Conversation

jborean93
Copy link
Contributor

@jborean93 jborean93 commented Jan 23, 2018

SUMMARY

Overrides the auth source for Azure credentials.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

azure_rm_common

ANSIBLE VERSION
2.5

@ansibot
Copy link
Contributor

ansibot commented Jan 23, 2018

@ansibot ansibot added affects_2.5 This issue/PR affects Ansible v2.5 azure cloud feature_pull_request needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Jan 23, 2018
Copy link
Member

@nitzmahone nitzmahone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couple little things, looks great!

@@ -49,6 +55,7 @@
)

AZURE_CREDENTIAL_ENV_MAPPING = dict(
auth_source='AZURE_AUTH_SOURCE',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We actually probably don't want this in the CREDENTIAL_ENV_MAPPING, since that'd be kinda chicken-or-egg... Probably want to check it explicitly if the module arg isn't set, and not support it in the credfile at all.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might also want to rename ANSIBLE_AZURE_AUTH_SOURCE - we really should've ANSIBLE_ namespaced all those from the start. :( Just want to make sure we don't collide with something they use.

- C(auto) will follow the default precedence of module parameters -> environment variables -> default profile in credential file
C(~/.azure/credentials).
- C(cli) will source the credentials from the Azure CLI profile.
- Can also be set vial the C(AZURE_AUTH_SOURCE) environment variable.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/vial/via

@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Jan 23, 2018
@ansibot ansibot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Jan 23, 2018
jborean93 and others added 3 commits January 23, 2018 15:42
* tweak error messages
* fix auto fallback to cli
* fix import issues when azure-cli not installed
@nitzmahone
Copy link
Member

rebuild_merge

@nitzmahone
Copy link
Member

Upstream hung creating a storage account in one of the 3.6 containers; all others passed. Merging.

@nitzmahone nitzmahone merged commit 9e48cf8 into ansible:devel Jan 23, 2018
@jborean93 jborean93 deleted the azure-auth-source branch January 23, 2018 07:39
Lujeni pushed a commit to Lujeni/ansible that referenced this pull request Feb 1, 2018
…nsible#35213)

* Azure: added auth_source to override the source of the credentials

* removed broken cli auth and fix some review changes

* missed some more cli auth stuff that isn't required

* Added cli auth back in

* Added docs around cli auth

* fix azure CLI auth issues

* tweak error messages
* fix auto fallback to cli
* fix import issues when azure-cli not installed
@ansibot ansibot added feature This issue/PR relates to a feature request. and removed feature_pull_request labels Mar 5, 2018
yuwzho pushed a commit to VSChina/ansible that referenced this pull request Mar 13, 2018
…nsible#35213)

* Azure: added auth_source to override the source of the credentials

* removed broken cli auth and fix some review changes

* missed some more cli auth stuff that isn't required

* Added cli auth back in

* Added docs around cli auth

* fix azure CLI auth issues

* tweak error messages
* fix auto fallback to cli
* fix import issues when azure-cli not installed
@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.5 This issue/PR affects Ansible v2.5 azure cloud feature This issue/PR relates to a feature request. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants