diff --git a/docs/intrants-base-gui-conception.md b/docs/intrants-base-gui-conception.md index 82945bc..abec73d 100644 --- a/docs/intrants-base-gui-conception.md +++ b/docs/intrants-base-gui-conception.md @@ -80,7 +80,7 @@ supporté) ; par groupe, dans le `group_vars//` correspondant. ## 7. Périmètre proposé (MVP → suite) -- **MVP** : `domaine_interne` (constante, avec garde-fou), `chezlepro_timezone` +- **MVP** : `domaine_interne` (constante, avec garde-fou), `fuseau_horaire` (défaut), accès Proxmox (constantes), golden template (constantes), placement Proxmox par défaut (nœud/stockage/pont), + nomenclature et secrets en lecture seule. - **Suite** : politiques de durcissement (défauts par groupe), DNS internes, relais diff --git a/docs/intrants-communs.md b/docs/intrants-communs.md index 1fcacf9..c17a97f 100644 --- a/docs/intrants-communs.md +++ b/docs/intrants-communs.md @@ -12,7 +12,7 @@ fois**, depuis un endroit unique, puis les laisser se **dériver** ou se **propa ### A. Identité de l'instance — `group_vars//all.yml` - **`domaine_interne`** — domaine DNS interne (ex. `chezlepro.internal`). **Keystone** : zones DNS, FQDN, base DN LDAP, expéditeurs courriel, URL AC en dérivent. -- `chezlepro_timezone` — fuseau (ex. `America/Toronto`). +- `fuseau_horaire` — fuseau (ex. `America/Toronto`). - `setops_plan_dir` — chemin du plan. ### B. Réseau & nomenclature — `plan/nomenclature.yml` @@ -76,7 +76,7 @@ domaines publics, `edge`, autorité DNS, FQDN exposés. | Accès Proxmox (API host/user/port/token) | **Constante** | — (un seul cluster) | | Golden template (vmid_modele, source_nom) | **Constante** | — | | Secrets Vault | **Constante** 🔒 | — (gérés à part, jamais en clair) | -| `chezlepro_timezone` | Défaut | par hôte (rare) | +| `fuseau_horaire` | Défaut | par hôte (rare) | | `proxmox_clone_noeud` / `stockage` / `pont` | Défaut | par hôte (`serveurs.yml`) | | DNS internes (plancher `/etc/hosts` + PowerDNS + `client_unbound`) | Défaut | par hôte / groupe | | Politiques durcissement (SSH, nftables, fail2ban, journald…) | Défaut | par hôte / groupe | @@ -97,6 +97,6 @@ Persistance : les fichiers existants (`group_vars/all.yml`, `proxmox.yml`, de la fonctionnalité GUI. ## 4. Incohérences repérées (à corriger) -- `chezlepro_timezone` défini en **lab** seulement, absent de **production**. +- `fuseau_horaire` défini en **lab** seulement, absent de **production**. - `group_vars/serveur_debian.yml` **référencé** (commentaire de prod `all.yml`) mais **absent** des deux environnements. diff --git a/roles/chrony/defaults/main.yml b/roles/chrony/defaults/main.yml index d893d97..2058f40 100644 --- a/roles/chrony/defaults/main.yml +++ b/roles/chrony/defaults/main.yml @@ -1,5 +1,5 @@ --- -# Fuseau horaire de l'hôte. Réutilise l'intrant de base global chezlepro_timezone +# Fuseau horaire de l'hôte. Réutilise l'intrant de base global fuseau_horaire # (source unique : inventories//group_vars/all/, panneau « Intrants » du GUI). # Laisser vide pour ne pas toucher au fuseau de la VM. -chrony_timezone: "{{ chezlepro_timezone | default('') }}" +chrony_timezone: "{{ fuseau_horaire | default('') }}" diff --git a/roles/chrony/tasks/main.yml b/roles/chrony/tasks/main.yml index c1516a1..2a2ac93 100644 --- a/roles/chrony/tasks/main.yml +++ b/roles/chrony/tasks/main.yml @@ -1,5 +1,5 @@ --- -- name: Définir le fuseau horaire (intrant global chezlepro_timezone) +- name: Définir le fuseau horaire (intrant global fuseau_horaire) community.general.timezone: name: "{{ chrony_timezone }}" when: chrony_timezone | length > 0 diff --git a/roles/serveur_forgejo/defaults/main.yml b/roles/serveur_forgejo/defaults/main.yml index fca153a..5a73cfe 100644 --- a/roles/serveur_forgejo/defaults/main.yml +++ b/roles/serveur_forgejo/defaults/main.yml @@ -46,7 +46,7 @@ serveur_forgejo_oidc_actif: true serveur_forgejo_oidc_nom: "chezlepro" # slug du callback : /user/oauth2//callback serveur_forgejo_oidc_client_id: "forgejo" serveur_forgejo_oidc_client_secret: "{{ vault_forgejo_oidc | default('') }}" # voûte (vault_forgejo_oidc) -serveur_forgejo_oidc_realm: "chezlepro" +serveur_forgejo_oidc_realm: "{{ identite_realm | default('chezlepro') }}" serveur_forgejo_oidc_discovery: "https://keycloak.{{ domaine_interne }}/realms/{{ serveur_forgejo_oidc_realm }}/.well-known/openid-configuration" # TLS vers PostgreSQL (zero-confiance). 'disable' = compat ; 'verify-full' = chiffre + verifie diff --git a/roles/serveur_grafana/defaults/main.yml b/roles/serveur_grafana/defaults/main.yml index c44f541..a8657bb 100644 --- a/roles/serveur_grafana/defaults/main.yml +++ b/roles/serveur_grafana/defaults/main.yml @@ -26,7 +26,7 @@ serveur_grafana_oidc_actif: true serveur_grafana_oidc_nom: "Chezlepro" serveur_grafana_oidc_client_id: "grafana" serveur_grafana_oidc_client_secret: "{{ vault_grafana_oidc | default('') }}" # voûte (vault_grafana_oidc) -serveur_grafana_oidc_realm: "chezlepro" +serveur_grafana_oidc_realm: "{{ identite_realm | default('chezlepro') }}" serveur_grafana_oidc_base: "https://keycloak.{{ domaine_interne }}/realms/{{ serveur_grafana_oidc_realm }}/protocol/openid-connect" serveur_grafana_oidc_scopes: "openid email profile" # RBAC via SSO : mappe le claim 'roles' (rôles de realm Keycloak) vers le niveau Grafana. diff --git a/roles/serveur_keycloak/defaults/main.yml b/roles/serveur_keycloak/defaults/main.yml index aeb8cfd..d591153 100644 --- a/roles/serveur_keycloak/defaults/main.yml +++ b/roles/serveur_keycloak/defaults/main.yml @@ -24,7 +24,7 @@ serveur_keycloak_admin_password: "{{ vault_keycloak_admin | default('') }}" # r # Keycloak lit l'annuaire (READ_ONLY) ; les users LDAP se connectent via le SSO. # Requiert client_pki sur ce nœud (racine step_ca dans le bundle système pour LDAPS). serveur_keycloak_ldap_federation: true -serveur_keycloak_realm: "chezlepro" +serveur_keycloak_realm: "{{ identite_realm | default('chezlepro') }}" # Thèmes du realm (déployés depuis files/themes/). Vide = thème Keycloak par défaut. serveur_keycloak_login_theme: "" serveur_keycloak_account_theme: "" diff --git a/roles/serveur_oauth2_proxy/defaults/main.yml b/roles/serveur_oauth2_proxy/defaults/main.yml index b2d7a64..fcf61a2 100644 --- a/roles/serveur_oauth2_proxy/defaults/main.yml +++ b/roles/serveur_oauth2_proxy/defaults/main.yml @@ -17,7 +17,7 @@ serveur_oauth2_proxy_service: "oauth2-proxy" serveur_oauth2_proxy_ecoute: "0.0.0.0:4180" # OIDC (Keycloak) — realm applicatif. -serveur_oauth2_proxy_realm: "chezlepro" +serveur_oauth2_proxy_realm: "{{ identite_realm | default('chezlepro') }}" serveur_oauth2_proxy_issuer: "https://keycloak.{{ domaine_interne }}/realms/{{ serveur_oauth2_proxy_realm }}" serveur_oauth2_proxy_client_id: "" # OBLIGATOIRE (par instance) serveur_oauth2_proxy_client_secret: "" # OBLIGATOIRE (voûte) diff --git a/roles/serveur_openldap/defaults/main.yml b/roles/serveur_openldap/defaults/main.yml index 8fbbefd..0ff7b81 100644 --- a/roles/serveur_openldap/defaults/main.yml +++ b/roles/serveur_openldap/defaults/main.yml @@ -8,7 +8,7 @@ serveur_openldap_service: "slapd" # Identite de l'annuaire. serveur_openldap_domaine: "{{ domaine_interne }}" -serveur_openldap_organisation: "{{ chezlepro_organisation | default('Organisation') }}" +serveur_openldap_organisation: "{{ organisation | default('Organisation') }}" # Base DN derivee du domaine interne (ex. acme.local -> dc=acme,dc=local). serveur_openldap_base_dn: "dc={{ serveur_openldap_domaine.split('.') | join(',dc=') }}" serveur_openldap_admin_dn: "cn=admin,{{ serveur_openldap_base_dn }}" diff --git a/scripts/inventory_gui.py b/scripts/inventory_gui.py index 7a1efd4..9e1a1c7 100644 --- a/scripts/inventory_gui.py +++ b/scripts/inventory_gui.py @@ -78,8 +78,9 @@ FICHIERS_INTRANTS = {"identite": INTRANTS_IDENTITE, "proxmox": INTRANTS_PROXMOX} # (variable, fichier, classe, section, libelle, type) INTRANTS_SCHEMA = [ ("domaine_interne", "identite", "constante", "Identité", "Domaine DNS interne", "str"), - ("chezlepro_timezone", "identite", "defaut", "Identité", "Fuseau horaire", "str"), - ("chezlepro_organisation", "identite", "defaut", "Identité", "Organisation (annuaire LDAP, certificats)", "str"), + ("fuseau_horaire", "identite", "defaut", "Identité", "Fuseau horaire", "str"), + ("organisation", "identite", "defaut", "Identité", "Organisation (annuaire LDAP, certificats)", "str"), + ("identite_realm", "identite", "defaut", "Identité", "Realm SSO (Keycloak)", "str"), ("proxmox_api_host", "proxmox", "constante", "Proxmox", "Hôte API Proxmox", "str"), ("proxmox_api_user", "proxmox", "constante", "Proxmox", "Utilisateur API", "str"), ("proxmox_api_port", "proxmox", "constante", "Proxmox", "Port API", "str"),