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: else:
commands = str(candidate).split('\n') commands = str(candidate).split('\n')
if commands:
commands = filter_exit(commands) commands = filter_exit(commands)
if commands:
if not module.check_mode: if not module.check_mode:
commands = [str(c).strip() for c in commands] commands = [str(c).strip() for c in commands]
response = module.configure(commands, replace=replace) response = module.configure(commands, replace=replace)