diff --git a/lib/ansible/modules/network/eos/eos_template.py b/lib/ansible/modules/network/eos/eos_template.py index 80a152e7f1c..61e7b8fca4e 100644 --- a/lib/ansible/modules/network/eos/eos_template.py +++ b/lib/ansible/modules/network/eos/eos_template.py @@ -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)