diff --git a/etc/genshi/secrets.txt b/etc/genshi/secrets.txt index 1335768..cc8b516 100644 --- a/etc/genshi/secrets.txt +++ b/etc/genshi/secrets.txt @@ -1,6 +1,4 @@ -{# Recuperation des mots de passe #} +{# Recuperation des mots de passe #}\ {% python - import os - os.sys.append('/usr/script/gestion') - import secrets -%} + execfile('/etc/crans/secrets/secrets.py') +%}\ diff --git a/etc/genshi/utils.py b/etc/genshi/utils.py index 1311ed8..25577d6 100644 --- a/etc/genshi/utils.py +++ b/etc/genshi/utils.py @@ -31,6 +31,9 @@ pubhostname = hostname + ".crans.org" # Le nom d'hote sur le vlan admhostname = hostname + ".adm.crans.org" +def has(group): + return group in metadata.groups + def yesno(b): if b: return "yes" diff --git a/etc/genshi/utils.txt b/etc/genshi/utils.txt index 40c6d58..c1b0008 100644 --- a/etc/genshi/utils.txt +++ b/etc/genshi/utils.txt @@ -1,9 +1,4 @@ {# Definitions utiles pour les templates #}\ {% python - import os - os.sys.path.append('/var/lib/bcfg2/etc/genshi') - from utils import * - - def has(group): - return group in metadata.groups + execfile('/var/lib/bcfg2/etc/genshi/utils.py') %}\