doc_infra/template/debian.rst.j2
Michaël Ricart 9876e46b93
All checks were successful
/ test (push) Successful in 13s
[DEBIAN] add docker tables
2025-02-28 14:04:41 +01:00

53 lines
2.8 KiB
Django/Jinja

{% include "base.rst.j2" %}
network
-------
ip
##
========= ==============
interface adresses
========= =============={% for interface in ip %}
{{ "{:<10}".format(interface["ifname"]) }} {% for ip in interface["addr_info"] %} {% if interface["addr_info"].index(ip) != 0 %} {% endif %}{{ ip["local"] }}/{{ ip["prefixlen"]}}
{% endfor %}{% endfor %}========= ==============
routes
######
============ =============== =============== ==============
destination netmask gateway interface
============ =============== =============== =============={% for route in routes %}
{{ "{:<12}".format(route["destination"]) }} {{ "{:<15}".format(route["genmask"]) }} {{ "{:<15}".format(route["gateway"]) }} {{ route["iface"] }}{% endfor %}
============ =============== =============== ==============
{% if resolvconf %}DNS
###
{% for nameserver in resolvconf["nameservers"] %}* {{nameserver}}
{% endfor %}{% endif %}
services
--------
{% if docker %}Docker
######
============================================================ ============================================================ ============================================================ ============================================================
Name Image Port Status
============================================================ ============================================================ ============================================================ ============================================================{% for dock in docker %}
{{ "{:<60}".format(dock["names"]) }} {{ "{:<60}".format(dock["image"]) }} {% if dock["ports"] %}{{ "{:<60}".format(dock["ports"].split(",")|string) }}{% else %}{{ "{:<60}".format("None") }}{% endif %} {{ "{:<60}".format(dock["status"]) }} {% endfor %}
============================================================ ============================================================ ============================================================ ============================================================{% endif %}
Systemd
#######
.. table:: services
:class: sphinx-datatable
================================================== ==================== ==============
service state description
================================================== ==================== =============={% for svc in services %}
{{ "{:<50}".format(svc["unit"][:49]) }} {{ "{:<20}".format(svc["sub"].replace("running",":green:`running`").replace("failed", ":red:`failed`")) }} {{ svc["description"] }}{% endfor %}
================================================== ==================== ==============