From 894bd15c7966bfa1e7c26a3f2516c2ea5df31ee0 Mon Sep 17 00:00:00 2001 From: Vitali Quiering Date: Sat, 25 Mar 2017 19:59:16 +0100 Subject: [PATCH] fix salt master config template to use external_auth settings --- salt/files/master.d/f_defaults.conf | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/salt/files/master.d/f_defaults.conf b/salt/files/master.d/f_defaults.conf index 36346ce..dd8d3b5 100644 --- a/salt/files/master.d/f_defaults.conf +++ b/salt/files/master.d/f_defaults.conf @@ -401,7 +401,19 @@ client_acl_blacklist: # pam: # fred: # - test.* -{{ get_config('external_auth', '{}') }} +{%- if 'external_auth' in cfg_master %} +{%- do default_keys.append('external_auth') %} +external_auth: +{%- for auth, users in cfg_master['external_auth']|dictsort %} + {{ auth }}: +{%- for user, commands in users.iteritems() %} + {{ user }}: +{%- for command in commands %} + - {% raw %}'{% endraw %}{{ command }}{% raw %}'{% endraw %} +{%- endfor -%} +{%- endfor -%} +{%- endfor -%} +{%- endif %} # Time (in seconds) for a newly generated token to live. Default: 12 hours {{ get_config('token_expire', '43200') }}