Enable host_key checking at the strategy level

Implements a new method in the ssh connection plugin (fetch_and_store_key)
which is used to prefetch the key using ssh-keyscan.
This commit is contained in:
James Cammarata
2015-12-15 09:39:13 -05:00
parent 15135f3c16
commit e5c2c03dea
6 changed files with 273 additions and 33 deletions

View File

@@ -23,11 +23,11 @@ __metaclass__ = type
import fcntl
import gettext
import os
from abc import ABCMeta, abstractmethod, abstractproperty
from functools import wraps
from ansible.compat.six import with_metaclass
from ansible.compat.six import with_metaclass
from ansible import constants as C
from ansible.errors import AnsibleError
from ansible.plugins import shell_loader
@@ -233,3 +233,4 @@ class ConnectionBase(with_metaclass(ABCMeta, object)):
f = self._play_context.connection_lockfd
fcntl.lockf(f, fcntl.LOCK_UN)
display.vvvv('CONNECTION: pid %d released lock on %d' % (os.getpid(), f))