Only activate a host once connected.
@@ -78,6 +78,8 @@ class Host(object):
def connect(self, state, *args, **kwargs):
if not self.connection:
self.connection = self.executor.connect(state, self, *args, **kwargs)
+
+ if self.connection:
state.activate_host(self)
return self.connection
