parent
391334efbf
commit
0cb496b818
3 changed files with 4 additions and 3 deletions
|
@ -27,7 +27,7 @@ def parse_debian(content):
|
|||
if section in ["services","routes"]:
|
||||
result[section] = loads(result[section])
|
||||
result["ip"] = parse_ip(result["ip"])
|
||||
result["os"] = result["version"]
|
||||
result["os"] = loads(result["version"])
|
||||
return result
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
{{ hostname.replace("\n", "") }}
|
||||
{{ "=" * (hostname|length) }}
|
||||
|
||||
:os: {{ os["name"] }}
|
||||
:version: {{ os["version"] }}
|
||||
:os: {{ os["NAME"] }}
|
||||
:version: {{ os["VERSION"] }}
|
||||
|
||||
|
|
|
@ -28,3 +28,4 @@ services
|
|||
================================================== ==================== =============={% for svc in services %}
|
||||
{{ "{:<50}".format(svc["unit"][:49]) }} {{ "{:<20}".format(svc["sub"].replace("running",":green:`running`").replace("failed", ":red:`failed`")) }} {{ svc["description"] }}{% endfor %}
|
||||
================================================== ==================== ==============
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue