2023-06-19 15:12:18 +02:00
|
|
|
{% set host_short = inventory_hostname.split('.')[0] %}
|
2024-12-03 19:00:17 +01:00
|
|
|
{% if inventory_hostname not in groups.storage_boxes | default([] )%}
|
2023-11-01 15:21:27 +01:00
|
|
|
|
|
|
|
{%- if ansible_virtualization_role is defined %}{{'{{:cmdb:kvm.png?0x50|}}'}}{% endif %}
|
|
|
|
{%- if 'nginx' in ansible_facts.packages %}{{'{{:cmdb:nginx.png?0x50|}}'}}{% endif %}
|
|
|
|
{%- if 'apache2' in ansible_facts.packages %}{{'{{:cmdb:apache.png?0x50|}}'}}{% endif %}
|
|
|
|
{%- if 'docker' in ansible_facts.packages %}{{'{{:cmdb:docker.png?0x50|}}'}}{% endif %}
|
|
|
|
{%- if 'php' in ansible_facts.packages %}{{'{{:cmdb:php.png?0x50|}}'}}{% endif %}
|
|
|
|
{%- if 'ruby' in ansible_facts.packages %}{{'{{:cmdb:rails.png?0x50|}}'}}{% endif %}
|
|
|
|
{%- if 'mariadb-server' in ansible_facts.packages %}{{'{{:cmdb:mariadb.png?0x50|}}'}}{% endif %}
|
|
|
|
{%- if 'postgresql' in ansible_facts.packages %}{{'{{:cmdb:postgresql.png?0x50|}}'}}{% endif %}
|
|
|
|
{%- if 'tinc' in ansible_facts.packages %}{{'{{:cmdb:tinc.png?0x50|}}'}}{% endif %}
|
|
|
|
{%- if 'tor' in ansible_facts.packages %}{{'{{:cmdb:tor.png?0x50|}}'}}{% endif %}
|
|
|
|
{% endif %}
|
2023-06-19 15:12:18 +02:00
|
|
|
|
|
|
|
====== {{ inventory_hostname }} =======
|
|
|
|
|
|
|
|
{% include 'section_header.txt.j2' %}
|
|
|
|
|
|
|
|
{% if cmdb_customer is defined %}
|
|
|
|
{% include 'section_customer.txt.j2' %}
|
|
|
|
{% endif %}
|
|
|
|
|
2024-12-03 19:00:17 +01:00
|
|
|
{% if inventory_hostname not in groups.storage_boxes | default([]) %}
|
2023-06-19 15:12:18 +02:00
|
|
|
{% include 'section_general.txt.j2' %}
|
|
|
|
|
|
|
|
{% include 'section_os-software.txt.j2' %}
|
|
|
|
|
|
|
|
{% if ansible_virtualization_role is undefined or ansible_virtualization_role == "host" %}
|
|
|
|
{% include 'section_block_devices.txt.j2' %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% include 'section_mounted_fs.txt.j2' %}
|
|
|
|
|
|
|
|
{% include 'section_networking.txt.j2' %}
|
|
|
|
|
|
|
|
{% if "qemu-system-x86" in ansible_facts.packages %}
|
|
|
|
===== KVM =====
|
|
|
|
==== Virtual machines ====
|
|
|
|
|
|
|
|
{% if qemu_vms is defined %}
|
|
|
|
<code>
|
|
|
|
{{ qemu_vms }}
|
|
|
|
</code>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
==== Virtual networks ====
|
|
|
|
|
|
|
|
{% if qemu_network is defined %}
|
|
|
|
<code>
|
|
|
|
{{ qemu_network }}
|
|
|
|
</code>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
==== Storage pools ====
|
|
|
|
|
|
|
|
{% if qemu_pool is defined %}
|
|
|
|
<code>
|
|
|
|
{{ qemu_pool }}
|
|
|
|
</code>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% endif %}
|
2023-11-01 15:21:27 +01:00
|
|
|
|
2024-12-03 19:00:17 +01:00
|
|
|
{% elif inventory_hostname in groups.storage_boxes | default([]) %}
|
2023-11-01 15:21:27 +01:00
|
|
|
{% include 'section_storage_boxes.txt.j2' %}
|
|
|
|
{% endif %}
|