1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

sends save command in text mode otherwise it fails (#21812)

Sending the save command over nxapi requires text mode otherwise nxapi
will reject the command.  This commit ensures that the command is always
sent in text mode

fixes #18971
This commit is contained in:
Peter Sprygada 2017-02-22 22:41:14 -05:00 committed by GitHub
parent 0e7ebf6391
commit 730bd682c6

View file

@ -332,7 +332,8 @@ def main():
if module.params['save']:
if not module.check_mode:
run_commands(module, ['copy running-config startup-config'])
cmd = {'command': 'copy running-config startup-config', 'output': 'text'}
run_commands(module, [cmd])
result['changed'] = True
module.exit_json(**result)