0.0.6: Find roles based on class name

This commit is contained in:
Daniel Parks 2018-09-17 16:54:03 -07:00
parent e19d65d899
commit 1b5fcaa9fc
No known key found for this signature in database
GPG key ID: 526AFD1C8F661806
2 changed files with 2 additions and 2 deletions

View file

@ -63,7 +63,7 @@ class Inventory(object):
def load_roles(self, pdb): def load_roles(self, pdb):
self.roles = defaultdict(list) self.roles = defaultdict(list)
condition = 'type = "Profile::Motd::Register" and file ~ "/site[.]pp$"' condition = 'type = "Class" and title ~ "^Role::"'
for node, resource in self.query_resources(pdb, condition): for node, resource in self.query_resources(pdb, condition):
if resource["title"] not in ("role", "role::delivery"): if resource["title"] not in ("role", "role::delivery"):
node["other"]["roles"].append(resource["title"]) node["other"]["roles"].append(resource["title"])

View file

@ -2,7 +2,7 @@ import setuptools
setuptools.setup( setuptools.setup(
name = "infinitory", name = "infinitory",
version = "0.0.5", version = "0.0.6",
description = "SRE host, role, and service inventory", description = "SRE host, role, and service inventory",
author = "Daniel Parks", author = "Daniel Parks",