add label extract script
This commit is contained in:
1 parent
8be1e4ee93
commit
544363d077
1 file changed
+13
@@ -0,0 +1,13 @@
|
||||
import yaml
|
||||
|
||||
LABEL = "leuchtturm.enable"
|
||||
|
||||
with open(0) as f:
|
||||
res = yaml.safe_load(f)
|
||||
|
||||
for key, service in res["services"].items():
|
||||
if "labels" not in service:
|
||||
continue
|
||||
labels = service["labels"]
|
||||
if LABEL in labels:
|
||||
print(key, end=" ")
|
||||
Reference in new issue
Block a user