From bb630f52ff6006800a5d2066706901004e2b84d9 Mon Sep 17 00:00:00 2001 From: Peter Sprygada Date: Fri, 26 Aug 2016 15:58:06 -0400 Subject: [PATCH] fixes iosxr configure method to commit the changes The iosxr configure method did not send the commit command to active the changes after pushed to the remote device. This change address that problem --- lib/ansible/module_utils/iosxr.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ansible/module_utils/iosxr.py b/lib/ansible/module_utils/iosxr.py index c15edc97488..b4910208f22 100644 --- a/lib/ansible/module_utils/iosxr.py +++ b/lib/ansible/module_utils/iosxr.py @@ -69,7 +69,10 @@ class Cli(CliBase): def configure(self, commands, **kwargs): cmds = ['configure terminal'] + if commands[-1] == 'end': + commands.pop() cmds.extend(to_list(commands)) + cmds.extend(['commit', 'end']) responses = self.execute(cmds) return responses[1:]