Merge pull request #3 from puppetlabs/roles

0.0.6: Find roles based on class name
This commit is contained in:
Daniel Parks 2018-09-17 17:03:10 -07:00 committed by GitHub
commit 26acc1d4c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -63,7 +63,7 @@ class Inventory(object):
def load_roles(self, pdb):
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):
if resource["title"] not in ("role", "role::delivery"):
node["other"]["roles"].append(resource["title"])

View file

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