summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSenthil Kumar Ganesan <skg.net.dev@gmail.com>2016-09-19 14:41:30 -0700
committerSenthil Kumar Ganesan <skg.net.dev@gmail.com>2016-09-19 14:41:30 -0700
commit081730851c1e81063ae7433c4871bbffd8d646bd (patch)
treed54c75b20bd7af4628fc261dea63c4d843d4b3ad
parent42a2875b83643a75c5a110f34819641569f2e503 (diff)
downloadansible-081730851c1e81063ae7433c4871bbffd8d646bd.tar.gz
Fix to handle the prompt on saving startup config
-rwxr-xr-xlib/ansible/module_utils/dellos9.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ansible/module_utils/dellos9.py b/lib/ansible/module_utils/dellos9.py
index 536dd2a92a..7e4b0a482a 100755
--- a/lib/ansible/module_utils/dellos9.py
+++ b/lib/ansible/module_utils/dellos9.py
@@ -123,7 +123,10 @@ class Cli(CliBase):
def save_config(self):
- self.execute(['copy running-config startup-config'])
+ cmdlist = list()
+ cmd = 'copy running-config startup-config'
+ cmdlist.append(Command(cmd, prompt=self.WARNING_PROMPTS_RE, response='yes'))
+ self.execute(cmdlist)
Cli = register_transport('cli', default=True)(Cli)