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

Move call to filter_exit out of command execution block to prevent setting 'changed' on a command list that is completely filtered (empty).

This commit is contained in:
Gary Rybak 2016-06-14 10:09:23 -06:00 committed by Matt Clay
parent b0135fadea
commit e2d55d86e4

View file

@ -191,8 +191,8 @@ def main():
else:
commands = str(candidate).split('\n')
commands = filter_exit(commands)
if commands:
commands = filter_exit(commands)
if not module.check_mode:
commands = [str(c).strip() for c in commands]
response = module.configure(commands, replace=replace)