feat: add various infrastructure check and automation scripts
This commit is contained in:
13
scripts/check_local_raw_yml.py
Normal file
13
scripts/check_local_raw_yml.py
Normal file
@@ -0,0 +1,13 @@
|
||||
with open(r'c:\Users\Snarf\OneDrive\Desktop\code\SnarfCode\homelab-gitops-repo\manifests\aerodrome\prometheus\prometheus.yaml', 'r', encoding='utf-8') as f:
|
||||
text = f.read()
|
||||
|
||||
start_marker = "prometheus.yml: |"
|
||||
start_idx = text.find(start_marker)
|
||||
end_idx = text.find("\n---", start_idx)
|
||||
raw_yml = text[start_idx + len(start_marker):end_idx]
|
||||
|
||||
print("Contains shipyard:", "shipyard" in raw_yml)
|
||||
for line in raw_yml.splitlines():
|
||||
if "shipyard" in line or "spaceport" in line or "node-exporter" in line:
|
||||
print(line)
|
||||
|
||||
Reference in New Issue
Block a user