|
@@ -61,6 +61,7 @@ def base_openshift_inventory(cluster_hosts):
|
|
|
|
|
|
return inventory
|
|
|
|
|
|
+
|
|
|
def get_docker_storage_mountpoints(volumes):
|
|
|
'''Check volumes to see if they're being used for docker storage'''
|
|
|
docker_storage_mountpoints = {}
|
|
@@ -73,6 +74,7 @@ def get_docker_storage_mountpoints(volumes):
|
|
|
docker_storage_mountpoints[attachment.server_id] = [attachment.device]
|
|
|
return docker_storage_mountpoints
|
|
|
|
|
|
+
|
|
|
def build_inventory():
|
|
|
'''Build the dynamic inventory.'''
|
|
|
cloud = shade.openstack_cloud()
|
|
@@ -140,5 +142,6 @@ def build_inventory():
|
|
|
inventory['_meta']['hostvars'][server.name] = hostvars
|
|
|
return inventory
|
|
|
|
|
|
+
|
|
|
if __name__ == '__main__':
|
|
|
print(json.dumps(build_inventory(), indent=4, sort_keys=True))
|