summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Sprygada <privateip@users.noreply.github.com>2016-08-26 16:18:01 -0400
committerGitHub <noreply@github.com>2016-08-26 16:18:01 -0400
commit4b679ffd844ee4549c76cd7e44ecce7968c53e66 (patch)
treeb5d785e563137cdf77decc8c0650ccdd4e15662e
parentf25ec5adb3bb00f2afebc8cc6ed87c23af4b8bd0 (diff)
parentbb630f52ff6006800a5d2066706901004e2b84d9 (diff)
downloadansible-4b679ffd844ee4549c76cd7e44ecce7968c53e66.tar.gz
Merge pull request #17265 from privateip/iosxr
fixes iosxr configure method to commit the changes
-rw-r--r--lib/ansible/module_utils/iosxr.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/ansible/module_utils/iosxr.py b/lib/ansible/module_utils/iosxr.py
index c15edc9748..b4910208f2 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:]