mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
check keys is in dim2 before evaluating
This commit is contained in:
parent
09e10ea031
commit
aaca9b5127
1 changed files with 1 additions and 1 deletions
|
@ -190,7 +190,7 @@ def create_metric_alarm(connection, module):
|
||||||
for keys in dim1:
|
for keys in dim1:
|
||||||
if not isinstance(dim1[keys], list):
|
if not isinstance(dim1[keys], list):
|
||||||
dim1[keys] = [dim1[keys]]
|
dim1[keys] = [dim1[keys]]
|
||||||
if dim1[keys] != dim2[keys]:
|
if keys not in dim2 or dim1[keys] != dim2[keys]:
|
||||||
changed=True
|
changed=True
|
||||||
setattr(alarm, 'dimensions', dim1)
|
setattr(alarm, 'dimensions', dim1)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue