{% extends 'base.html' %} {% block title %}{{ c.label }}{% endblock %} {% block content %}
← Safe Patching

{{ c.label }}

quickwin {{ c.status }}
{% set p = perms if perms is defined else request.state.perms %} {% if p.campaigns == 'admin' %}
{% endif %}
{% if msg %}
{% if msg.startswith('excluded_') %}{{ msg.split('_')[1] }} serveur(s) exclu(s).{% elif msg == 'no_pending' %}Aucun serveur en attente.{% elif msg == 'prereqs_done' %}Prérequis vérifiés.{% endif %}
{% endif %}

Branche 1 — Hors-prod

{{ qw_stats.hprod_total }} total {{ qw_stats.hprod_patched }} patchés {{ qw_stats.hprod_failed }} échoués

Branche 2 — Production

{{ qw_stats.prod_total }} total {{ qw_stats.prod_patched }} patchés {{ qw_stats.prod_failed }} échoués
{% for s in ['prereqs','snapshot','execute','postcheck'] %} {% endfor %}

Step 1 — Vérification prérequis

{% for s in sessions %} {% if s.status != 'excluded' %} {% endif %} {% endfor %}
Hostname Env Domaine SSH Disque Satellite État
{% if s.status == 'pending' %}{% endif %} {{ s.hostname }} {{ (s.environnement or '')[:6] }} {{ s.domaine or '-' }} {% if s.prereq_ssh == 'ok' %}OK{% elif s.prereq_ssh == 'ko' %}KO{% else %}{% endif %} {% if s.prereq_disk_ok is true %}OK{% elif s.prereq_disk_ok is false %}KO{% else %}{% endif %} {% if s.prereq_satellite == 'ok' %}OK{% elif s.prereq_satellite == 'ko' %}KO{% elif s.prereq_satellite == 'na' %}N/A{% else %}{% endif %} {% if s.prereq_validated %}OK{% elif s.prereq_date %}KO{% else %}{% endif %}

Step 2 — Snapshot vSphere

Créer un snapshot sur toutes les VMs avant patching. Les serveurs physiques sont ignorés.

Step 3 — Exécution Safe Patching

Commande yum (éditable)

{{ safe_excludes|length }} packages exclus. Modifiez si besoin avant de lancer.

{% if qw_stats.hprod_total > 0 and qw_stats.hprod_patched == qw_stats.hprod_total %}
{% else %} Production disponible après hors-prod à 100% {% endif %}

Step 4 — Vérification post-patch

Vérifier les services, ports et needs-restarting après patching.

Export CSV
{% for s in sessions %} {% if s.status in ('patched', 'failed') %} {% endif %} {% endfor %}
Hostname Env Statut Packages Reboot Services
{{ s.hostname }} {{ (s.environnement or '')[:6] }} {{ s.status }} {{ s.packages_updated or 0 }} {% if s.reboot_required %}Oui{% else %}Non{% endif %} {% if s.postcheck_services == 'ok' %}OK{% elif s.postcheck_services == 'ko' %}KO{% else %}{% endif %}
{% if excluded %}
{{ excluded|length }} serveur(s) exclu(s)
{% for s in excluded %}{{ s.hostname }}{% if not loop.last %}, {% endif %}{% endfor %}
{% endif %} {% endblock %}