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.