
== System: {{ use_fqdn | default(ansible_facts.fqdn) }}
Dane na dzień: {{ ansible_facts.date_time.date }}

== Dane podstawowe
[cols="1,1"]
|===
| System:
| {{ use_fqdn | default(ansible_facts.fqdn) }}

| Architektura:
| {{ ansible_facts.architecture }}

| Właściciel biznesowy:
| {% if dp_audit_business_owner is defined %} {{ dp_audit_business_owner }} {% else %} FIXME_business_owner {% endif %}

| Objęty backupem:
| {% if "bareos_clients" in group_names %} tak {% else %} nie {% endif %}

| Rodzina systemów:
| {% if ansible_facts.os_family is defined %} {{ ansible_facts.os_family }} {% else %} undefined {% endif %}

| Dystrybucja:
| {% if ansible_facts.distribution is defined %} {{ ansible_facts.distribution }} {% else %} undefined {% endif %}

| Wersja:
| {% if ansible_facts.distribution_major_version is defined %} {{ ansible_facts.distribution_major_version }} {% else %} undefined {% endif %}

| Wirtualizacja:
| {% if ansible_facts.virtualization_role is defined %} {{ ansible_facts.virtualization_role }} {% else %} undefined {% endif %}

{% if ansible_facts.product_name is defined %}
| Komputer: 
| {{ ansible_facts.product_name }}
{% endif %}

{% if ansible_facts.product_serial is defined %}
| Numer seryjny:
| {{ ansible_facts.product_serial }}
{% endif %}

| CPU: 
| {{ ansible_facts.processor[2] }}

| CPU rdzenie:
| {{ ansible_facts.processor_cores }} 

| CPU wątki per rdzeń:
| {{ ansible_facts.processor_threads_per_core }}

| RAM:
| {{ ansible_facts.memtotal_mb }}MiB

{# Windows only #}
{% if ansible_facts.disks is defined %}
{% for disk in ansible_facts.disks %}
| Dysk:
| {{ disk.physical_disk.media_type }} {{ disk.physical_disk.friendly_name }} {{ disk.physical_disk.size /1024/1024//1024  }} GiB
| Numer seryjny: 
| {{ disk.physical_disk.serial_number }}
| Stan S.M.A.R.T:
| {{ disk.physical_disk.health_status }}

{% endfor %} {% endif %}

{# FIXME add Linux #}
{# FIXME add disk usage #}

{% if ansible_facts.system == "Win32NT" %}
{% for ipaddress in ansible_facts.interfaces %}
| IP:
| {{ ipaddress.ipv4.address }}/{{ ipaddress.ipv4.prefix }}
{% endfor %}
{% endif %}

{% if ansible_facts.system == "Linux" %}
{% for ipaddress in ansible_facts.all_ipv4_addresses %}
| IP:
| {{ ipaddress }}
{% endfor %}
{% endif %}



|===

{% if ansible_facts.system == "Win32NT" %}

== Lista oprogramowania

[%header,format=csv]
|===
include::{{ dp_audit_output_destination_processed_dir }}/include_windows_software.csv[]
|===

== Lista użytkowników 
[format=csv]
|===
include::{{ dp_audit_output_destination_processed_dir }}/users_normal.txt[]
|===

== Lista użytkowników uprzywilejowanych
[format=csv]
|===
include::{{ dp_audit_output_destination_processed_dir }}/users_privileged.txt[]
|===


== Lista instalacji aktualizacji

[%header,format=csv]
|===
Data,Operacja,Patch
include::{{ dp_audit_output_destination_processed_dir }}/updates.csv[]
|===

{% endif %}


{% if ansible_facts.system == "Linux" %}

== Lista użytkowników 
[format=csv]
|===
include::{{ dp_audit_output_destination_processed_dir }}/users_normal.txt[]
|===

== Lista użytkowników uprzywilejowanych
[format=csv]
|===
include::{{ dp_audit_output_destination_processed_dir }}/users_privileged.txt[]
|===


== Lista instalacji aktualizacji

[%header,format=csv]
|===
include::{{ dp_audit_output_destination_processed_dir }}/updates.csv[]
|===


== Lista oprogramowania

[%header]
|===
| Oprogramowanie
{% for software in ansible_facts.packages %}
| {{ software }}
{% endfor %}
|===


{% endif %}
