Set-OPS-Public/roles/app_python/defaults/main.yml

26 lines
1.5 KiB
YAML
Raw Normal View History

---
# =========================================================================
# 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 }}"