mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
ios_config: fix "save" arg results in timeout (#21344)
* ios_config: fix "save" arg results in timeout The command "copy running-config startup-config" prompts for a destination filename, which was not handled. ~~~ testswitch#copy running-config startup-config Destination filename [startup-config]? Building configuration... [OK] 0 bytes copied in 0.679 secs (0 bytes/sec) [15:16] ios: write memory ~~~ * test_ios_config: adjust test_ios_config_save
This commit is contained in:
parent
58fa0bc1ea
commit
f2729f11c3
2 changed files with 2 additions and 2 deletions
|
@ -382,7 +382,7 @@ def main():
|
|||
|
||||
if module.params['save']:
|
||||
if not module.check_mode:
|
||||
run_commands(module, ['copy running-config startup-config'])
|
||||
run_commands(module, ['copy running-config startup-config\r'])
|
||||
result['changed'] = True
|
||||
|
||||
module.exit_json(**result)
|
||||
|
|
|
@ -75,7 +75,7 @@ class TestIosConfigModule(TestIosModule):
|
|||
self.assertEqual(self.get_config.call_count, 0)
|
||||
self.assertEqual(self.load_config.call_count, 0)
|
||||
args = self.run_commands.call_args[0][1]
|
||||
self.assertIn('copy running-config startup-config', args)
|
||||
self.assertIn('copy running-config startup-config\r', args)
|
||||
|
||||
def test_ios_config_lines_wo_parents(self):
|
||||
set_module_args(dict(lines=['hostname foo']))
|
||||
|
|
Loading…
Reference in a new issue