35 lines
2.3 KiB
YAML
35 lines
2.3 KiB
YAML
---
|
|
# =============================================================================
|
|
# tasks/summary.yml — Affichage du résumé et alertes éventuelles
|
|
# =============================================================================
|
|
|
|
- name: Afficher le résumé des sessions distantes
|
|
ansible.builtin.debug:
|
|
msg:
|
|
- "══════════════════════════════════════════"
|
|
- "Host : {{ inventory_hostname }}"
|
|
- "Timestamp : {{ ansible_local.remote_users.timestamp }}"
|
|
- "──────────────────────────────────────────"
|
|
- "SSH : {{ ansible_local.remote_users.sessions.ssh }}"
|
|
- "Citrix : {{ ansible_local.remote_users.sessions.citrix }}"
|
|
- "Horizon : {{ ansible_local.remote_users.sessions.horizon }}"
|
|
- "Total proto : {{ ansible_local.remote_users.sessions.total_by_protocol }}"
|
|
- "Who remote : {{ ansible_local.remote_users.sessions.who_remote }}"
|
|
- "──────────────────────────────────────────"
|
|
- "Verdict : {{ ansible_local.remote_users.reliability.verdict }}"
|
|
- "Ratio : {{ ansible_local.remote_users.reliability.ratio_who_over_total }}"
|
|
- "Détail : {{ ansible_local.remote_users.reliability.detail }}"
|
|
- "──────────────────────────────────────────"
|
|
- "Utilisateurs: {{ ansible_local.remote_users.users_remote | default('aucun') }}"
|
|
- "Citrix VDA : {{ ansible_local.remote_users.detection.citrix_vda_installed }}"
|
|
- "Horizon Agt : {{ ansible_local.remote_users.detection.horizon_agent_installed }}"
|
|
- "══════════════════════════════════════════"
|
|
|
|
- name: Alerter si le verdict est anormal
|
|
ansible.builtin.debug:
|
|
msg: >-
|
|
⚠ ATTENTION sur {{ inventory_hostname }} —
|
|
Verdict: {{ ansible_local.remote_users.reliability.verdict }} —
|
|
{{ ansible_local.remote_users.reliability.detail }}
|
|
when: ansible_local.remote_users.reliability.verdict in remote_users_fact_warn_verdicts
|