Merge pull request #4804 from privateip/eos_template

fixes error when calling load_config() with session keyword
This commit is contained in:
Peter Sprygada 2016-09-12 16:54:00 -04:00 committed by GitHub
commit a2dbd92930

View file

@ -117,8 +117,10 @@ responses:
"""
import re
import ansible.module_utils.eos
from ansible.module_utils.network import NetworkModule
from ansible.module_utils.netcfg import NetworkConfig, dumps
from ansible.module_utils.eos import NetworkModule
def get_config(module):
config = module.params.get('config')
@ -199,12 +201,8 @@ def main():
commands = filter_exit(commands)
if commands:
if not module.check_mode:
response = module.config.load_config(commands,
replace=replace,
session='eos_template',
response = module.config.load_config(commands, replace=replace,
commit=True)
module.cli('no configure session eos_template')
result['responses'] = response
result['changed'] = True