Add name field for users for basic auth
Add ability to specify user name as differen field from user context.
Change-Id: I19b3dc9acdcf4a136983898de9b4eb4598747d32
Related-Prod: PROD-33847
diff --git a/nginx/server/users.sls b/nginx/server/users.sls
index 8679f58..8dc3081 100644
--- a/nginx/server/users.sls
+++ b/nginx/server/users.sls
@@ -1,6 +1,8 @@
{%- from "nginx/map.jinja" import server with context %}
-{%- for user_name, user in server.get('user', {}).iteritems() %}
+{%- for p_user_name, user in server.get('user', {}).iteritems() %}
+{%- set user_name = user.get('name', p_user_name) %}
+
{%- if user.enabled %}
nginx_setup_user_{{ user_name }}: