Commit 501371ce authored by Alberts S's avatar Alberts S
Browse files

Make sure Inventory returns hosts in same order across runs

parent 03210c5f
......@@ -54,4 +54,5 @@ class Inventory(CapybaraNetty):
except KeyError as e:
self.__logger.warning(f"Skipped {chefNode} due to {type(e).__name__}")"Loaded {len(hosts)} hosts")
return hosts
# a bit of determinism
return sorted(hosts, key=lambda d: d["hostname"])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment