mirror of
https://github.com/puppetlabs/infinitory.git
synced 2026-01-26 02:08:41 -05:00
0.0.6: Find roles based on class name
This commit is contained in:
parent
e19d65d899
commit
1b5fcaa9fc
2 changed files with 2 additions and 2 deletions
|
|
@ -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"])
|
||||||
|
|
|
||||||
2
setup.py
2
setup.py
|
|
@ -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",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue