diff options
author | Peter Sprygada <privateip@users.noreply.github.com> | 2016-10-12 21:00:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-12 21:00:27 -0400 |
commit | d8d9ab8f6d17967fdd6519d28765bfd5c9381c57 (patch) | |
tree | acc3f38f4bf0ff1f0ea42d07398c5527d680ad86 | |
parent | 9c25a7f97ebd77953def9e47fa79031997bc0ebe (diff) | |
download | ansible-modules-core-d8d9ab8f6d17967fdd6519d28765bfd5c9381c57.tar.gz |
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
-rw-r--r-- | network/ios/ios_config.py | 20 |
1 files changed, 0 insertions, 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)) |