diff --git a/contrib/inventory_builder/inventory.py b/contrib/inventory_builder/inventory.py
index 7708412eaa21429ff5d2415200be4a9a5dba11ec..2cd2494afdae690e11ca0420f0197570113ad36b 100644
--- a/contrib/inventory_builder/inventory.py
+++ b/contrib/inventory_builder/inventory.py
@@ -81,7 +81,7 @@ class KubesprayInventory(object):
         if self.config_file:
             try:
                 self.hosts_file = open(config_file, 'r')
-                self.yaml_config = yaml.load(self.hosts_file)
+                self.yaml_config = yaml.load_all(self.hosts_file)
             except OSError:
                 pass