From b03091213d88f7ceb55031b5c59bdd07e8657e95 Mon Sep 17 00:00:00 2001 From: Mike Wiebe Date: Wed, 11 Sep 2019 10:08:54 -0400 Subject: [PATCH] Call get_capabilities to initiate device connection (#62103) --- lib/ansible/plugins/action/nxos_file_copy.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ansible/plugins/action/nxos_file_copy.py b/lib/ansible/plugins/action/nxos_file_copy.py index 848f29ee7bf..0942aee5968 100644 --- a/lib/ansible/plugins/action/nxos_file_copy.py +++ b/lib/ansible/plugins/action/nxos_file_copy.py @@ -451,6 +451,10 @@ class ActionModule(ActionBase): if socket_path is None: socket_path = self._connection.socket_path self.conn = Connection(socket_path) + + # Call get_capabilities() to start the connection to the device. + self.conn.get_capabilities() + self.socket_timeout = self.conn.get_option('persistent_command_timeout') # This action plugin support two modes of operation.