99-custom.j2 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/sh
  2. cat << 'EOF'
  3. This system is managed by Ansible.
  4. {% if figlethost.stdout is defined %} {{ figlethost.stdout }} {% endif %}
  5. {{ freifunk.name }}
  6. EOF
  7. echo " OS : $(lsb_release -d -s) $(lsb_release -c -s)"
  8. echo " Hostname : $(hostname)"
  9. echo " IP address : $(hostname -I | cut -d' ' -f1){% if ansible_default_ipv6.address is defined %} / {{ ansible_default_ipv6.address }}{% endif %}"
  10. echo " System type : $(uname -s) $(uname -m)"
  11. echo " Kernel : $(uname -r)"
  12. echo " "
  13. echo " Besitzer : {{ server_besitzer }}"
  14. cat << 'EOF'
  15. {% if ffnw_nat_ip is defined %}
  16. FFNW-NAT-IP : {{ffnw_nat_ip}}
  17. {% endif %}
  18. {% if ffrl_nat_ip is defined %}
  19. FFRL-NAT-IP : {{ffrl_nat_ip}}
  20. {% endif %}
  21. {% if domaenenliste is defined %}
  22. {% for domaene in domaenenliste|dictsort %}
  23. Domäne-{{domaene[0]}} : {{domaenen[domaene[0]].ffv4_network | ipaddr(domaene[1].server_id) | ipaddr('address') }} / {{domaenen[domaene[0]].ffv6_network | ipaddr(domaene[1].server_id) | ipaddr('address') }}
  24. {% endfor %}
  25. {% elif group_names[0].startswith('domaene-') %}
  26. Freifunk IP: {{ff_network.v4_network | ipaddr(server_id) | ipaddr('address') }} / {{ff_network.v6_network | ipaddr(server_id) | ipaddr('address') }}
  27. Domäne: {{ group_names | last }}
  28. {% else %}
  29. Aufgabe: {{ group_names | last }}
  30. {% endif %}
  31. EOF