1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Compare exploded values in the sysctl module to avoid whitespace errors

Fixes #3931
This commit is contained in:
James Cammarata 2013-09-10 23:24:24 -05:00
parent b2741f451e
commit 3e9b63febd

View file

@ -195,7 +195,7 @@ def sysctl_check(current_step, **sysctl_args):
output = re.sub('(\s+)', ' ', output)
# normal case, finded value must be equal to the submitted value :
if output != sysctl_args['value']:
if output.split() != sysctl_args['value'].split():
return 1, 'key seems not set to value even after update/sysctl, founded : <%s>, wanted : <%s>' % (output, sysctl_args['value'])
return 0, ''