mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Fix bug that was uncovered by comparing the port range which is inherently a string but ansible passes the param in as an implied int if the range does not contain a non-numeric char (#27017)
This commit is contained in:
parent
7eab802669
commit
bf63301b34
1 changed files with 4 additions and 4 deletions
|
@ -416,12 +416,12 @@ def compare_rules(r, rule):
|
|||
if rule['protocol'] != r['protocol']:
|
||||
changed = True
|
||||
r['protocol'] = rule['protocol']
|
||||
if rule['source_port_range'] != r['source_port_range']:
|
||||
if str(rule['source_port_range']) != str(r['source_port_range']):
|
||||
changed = True
|
||||
r['source_port_range'] = rule['source_port_range']
|
||||
if rule['destination_port_range'] != r['destination_port_range']:
|
||||
r['source_port_range'] = str(rule['source_port_range'])
|
||||
if str(rule['destination_port_range']) != str(r['destination_port_range']):
|
||||
changed = True
|
||||
r['destination_port_range'] = rule['destination_port_range']
|
||||
r['destination_port_range'] = str(rule['destination_port_range'])
|
||||
if rule['access'] != r['access']:
|
||||
changed = True
|
||||
r['access'] = rule['access']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue