--- # ========================================================================= # app_python — l'environnement d'execution Python d'une application cliente (D-93). # # ROLE UTILITAIRE, PAS UN GROUPE : `serveur_web_dorsal` l'inclut pour chaque application dont # le contrat dit `execution: python`, apres avoir verifie la version, le contrat et les secrets, # et depose le code au commit exact. # # entree : app_python_application = {nom, source, version, commit, dossier, port, noms, contrat} # ========================================================================= app_python_application: {} # Ce que le socle commun a pose ; lu, jamais redeclare. app_python_utilisateur: "{{ serveur_web_dorsal_utilisateur | default('webapp') }}" app_python_etat_racine: "{{ serveur_web_dorsal_etat_racine | default('/var/lib/setops-apps') }}" app_python_secrets_racine: "{{ serveur_web_dorsal_secrets_racine | default('/etc/setops-apps') }}" app_python_secrets: "{{ (serveur_web_dorsal_secrets | default({})).get(app_python_application.nom, {}) }}" app_python_port_front: "{{ serveur_web_dorsal_port | default(80) }}" # Derives du contrat : un seul endroit pour les lire. app_python_contrat: "{{ app_python_application.contrat | default({}) }}" app_python_livrees: "{{ app_python_contrat.dependances | default('') == 'livrees' }}" app_python_venv: "{{ app_python_application.dossier }}/.venv" app_python_dossier_etat: "{{ (app_python_contrat.etat | default({})).dossier | default('') }}" app_python_unite: "setops-app-{{ app_python_application.nom }}" # LA BASE DE L'APPLICATION (2026-11-15) : {hote, port, base, utilisateur, tls, ca}, et son mot de # passe a part. `serveur_web_dorsal` les resout (`resoudre_base`) quand le contrat dit `etat.base`. # Vides, l'application n'a pas de base. app_python_base: {} app_python_base_mdp: "" # Le fichier d'environnement (lisible par root seul) existe des qu'il porte quelque chose : un # secret du contrat, ou la connexion a la base. app_python_environnement: "{{ (app_python_contrat.secrets | default([]) | length > 0) or (app_python_base | length > 0) }}"