Skip to content

Commit

Permalink
Update azure_rm_openshiftmanagedcluster.py (ansible-collections#1629)
Browse files Browse the repository at this point in the history
Looks like we need to check if the attribute is set before trying to use it.

Fixes ansible-collections#1628
  • Loading branch information
p3ck authored Jul 23, 2024
1 parent 4590e25 commit 4cba904
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/modules/azure_rm_openshiftmanagedcluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,8 @@ def exec_module(self, **kwargs):
if key == 'cluster_profile':
self.body['properties']['clusterProfile'] = {}
for item in ['pull_secret', 'cluster_resource_group_id', 'domain', 'version']:
if not kwargs[key].get(item):
continue
if item == 'pull_secret':
self.body['properties']['clusterProfile']['pullSecret'] = kwargs[key].get(item)
elif item == 'cluster_resource_group_id':
Expand Down

0 comments on commit 4cba904

Please sign in to comment.