mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 06:10:22 -07:00
fixes error when calling load_config() with session keyword
The session keyword is no longer needed or supported in the load_config() method for eos. This fixes an issue in eos_template where the session keyword was still being sent.
This commit is contained in:
parent
ae310d5034
commit
3a7301bb3b
1 changed files with 4 additions and 6 deletions
|
@ -117,8 +117,10 @@ responses:
|
||||||
"""
|
"""
|
||||||
import re
|
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.netcfg import NetworkConfig, dumps
|
||||||
from ansible.module_utils.eos import NetworkModule
|
|
||||||
|
|
||||||
def get_config(module):
|
def get_config(module):
|
||||||
config = module.params.get('config')
|
config = module.params.get('config')
|
||||||
|
@ -199,12 +201,8 @@ def main():
|
||||||
commands = filter_exit(commands)
|
commands = filter_exit(commands)
|
||||||
if commands:
|
if commands:
|
||||||
if not module.check_mode:
|
if not module.check_mode:
|
||||||
response = module.config.load_config(commands,
|
response = module.config.load_config(commands, replace=replace,
|
||||||
replace=replace,
|
|
||||||
session='eos_template',
|
|
||||||
commit=True)
|
commit=True)
|
||||||
|
|
||||||
module.cli('no configure session eos_template')
|
|
||||||
result['responses'] = response
|
result['responses'] = response
|
||||||
result['changed'] = True
|
result['changed'] = True
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue