|
|
|
@ -25,6 +25,7 @@ import json
|
|
|
|
|
from ansible import constants as C
|
|
|
|
|
from ansible.errors import AnsibleConnectionFailure, AnsibleError
|
|
|
|
|
from ansible.module_utils._text import to_bytes, to_native, to_text
|
|
|
|
|
from ansible.module_utils.parsing.convert_bool import BOOLEANS_TRUE
|
|
|
|
|
from ansible.plugins.loader import netconf_loader
|
|
|
|
|
from ansible.plugins.connection import ConnectionBase, ensure_connect
|
|
|
|
|
from ansible.utils.jsonrpc import Rpc
|
|
|
|
@ -86,8 +87,10 @@ class Connection(Rpc, ConnectionBase):
|
|
|
|
|
raise AnsibleConnectionFailure('Unable to automatically determine host network os. Please ansible_network_os value')
|
|
|
|
|
|
|
|
|
|
ssh_config = os.getenv('ANSIBLE_NETCONF_SSH_CONFIG', False)
|
|
|
|
|
if ssh_config == 'True':
|
|
|
|
|
if ssh_config in BOOLEANS_TRUE:
|
|
|
|
|
ssh_config = True
|
|
|
|
|
else:
|
|
|
|
|
ssh_config = None
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
self._manager = manager.connect(
|
|
|
|
|