From d8d9ab8f6d17967fdd6519d28765bfd5c9381c57 Mon Sep 17 00:00:00 2001 From: Peter Sprygada Date: Wed, 12 Oct 2016 21:00:27 -0400 Subject: removes automated backup of ios to flash due to errors (#5245) The feature is extremely unstable right now and decision to pull it out for 2.2. Workaround is to do the same in the playbook --- network/ios/ios_config.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/network/ios/ios_config.py b/network/ios/ios_config.py index 7ca12716..cff8ebd4 100644 --- a/network/ios/ios_config.py +++ b/network/ios/ios_config.py @@ -230,17 +230,6 @@ def get_candidate(module): candidate.add(module.params['lines'], parents=parents) return candidate -def load_backup(module): - try: - module.cli(['exit', 'config replace flash:/ansible-rollback force']) - except NetworkError: - module.fail_json(msg='unable to load backup configuration') - -def backup_config(module): - cmd = 'copy running-config flash:/ansible-rollback' - cmd = Command(cmd, prompt=re.compile('\? $'), response='\n') - module.cli(cmd) - def run(module, result): match = module.params['match'] replace = module.params['replace'] @@ -268,20 +257,12 @@ def run(module, result): result['updates'] = commands - # create a backup copy of the current running-config on - # device flash drive - backup_config(module) - # send the configuration commands to the device and merge # them with the current running config if not module.check_mode: module.config(commands) result['changed'] = True - # remove the backup copy of the running-config since its - # no longer needed - module.cli('delete /force flash:/ansible-rollback') - if module.params['save']: if not module.check_mode: module.config.save_config() @@ -340,7 +321,6 @@ def main(): try: run(module, result) except NetworkError: - load_backup(module) exc = get_exception() module.fail_json(msg=str(exc)) -- cgit v1.2.1