14 lines
267 B
Python
14 lines
267 B
Python
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=" ")
|