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_rm_deployment - fix premature exit when RG doesn't exist #46013

Merged
merged 1 commit into from
Sep 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/fragments/azure_rm_deployment_fix_45941.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- azure_rm_deployment - fixed regression that prevents resource group from being created (https://github.com/ansible/ansible/issues/45941)
3 changes: 2 additions & 1 deletion lib/ansible/modules/cloud/azure/azure_rm_deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,8 @@ def deploy_template(self):

if self.append_tags and self.tags:
try:
rg = self.get_resource_group(self.resource_group_name)
# fetch the RG directly (instead of using the base helper) since we don't want to exit if it's missing
rg = self.rm_client.resource_groups.get(self.resource_group_name)
if rg.tags:
self.tags = dict(self.tags, **rg.tags)
except CloudError:
Expand Down