From 95d90330685497dbad62bed280389f3d8dcc37e2 Mon Sep 17 00:00:00 2001 From: Kenneth Wilke Date: Tue, 20 Aug 2013 12:37:58 -0500 Subject: [PATCH] template proxy test --- sudoers/files/sudoers | 4 +--- sudoers/files/sudoers_prepare.py | 5 +++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/sudoers/files/sudoers b/sudoers/files/sudoers index d5e23e6..ddea2af 100644 --- a/sudoers/files/sudoers +++ b/sudoers/files/sudoers @@ -11,9 +11,7 @@ # Cmnd alias specification # User privilege specification -{%- for userspec in users %} -{{ userspec }} -{%- endfor %} +{{ users }} # Group privilege specification diff --git a/sudoers/files/sudoers_prepare.py b/sudoers/files/sudoers_prepare.py index 18f2663..428bdbc 100644 --- a/sudoers/files/sudoers_prepare.py +++ b/sudoers/files/sudoers_prepare.py @@ -1,4 +1,5 @@ - +import salt.renderers.jinja as jinja def run(): - return str(pillar.get('sudoers')) + sudoers = pillar.get('sudoers', {}) + return jinja.render('sudoers/files/sudoers', users=sudoers.get('users', {}))