Skip to content

Commit

Permalink
restores pre 2.3 behavior with respects to keys (ansible#23083)
Browse files Browse the repository at this point in the history
This removes the requirement to configure look_for_keys=False and
restores the behavior to disable key lookup if no key was provided.
  • Loading branch information
privateip authored Mar 29, 2017
1 parent 6f77498 commit 88ce6fd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/ansible/plugins/connection/network_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import traceback
import logging

from ansible import constants as C
from ansible.errors import AnsibleConnectionFailure
from ansible.module_utils.six.moves import StringIO
from ansible.plugins import terminal_loader
Expand Down Expand Up @@ -74,6 +75,10 @@ def update_play_context(self, play_context):

def _connect(self):
"""Connections to the device and sets the terminal type"""

if self._play_context.password and not self._play_context.private_key_file:
C.PARAMIKO_LOOK_FOR_KEYS = False

super(Connection, self)._connect()

display.display('ssh connection done, setting terminal', log_only=True)
Expand Down

0 comments on commit 88ce6fd

Please sign in to comment.