feat(ansible-role-remote_users_fact) first commit
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
---
|
||||
# =============================================================================
|
||||
# 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
|
||||
Reference in New Issue
Block a user