Add `Host.connected` property.
@@ -85,6 +85,10 @@ class Host(object):
def __repr__(self):
return 'Host({0})'.format(self.name)
+ @property
+ def connected(self):
+ return self.connection is not None
+
@property
def host_data(self):
return self.inventory.get_host_data(self.name)
