瀏覽代碼

Fix Undefined jinja variable error with Salt 0.17.1

Ran into an error with Salt version 0.17.1:
Rendering SLS users failed, render error: Undefined jinja variable; line 32

After finding https://github.com/saltstack/salt/issues/8245, and working on
line 32, I surmised that line 28 might be the actual cause of the issue.

I just added a quick check to see if uid exists in user, just as the user uid
line does.
tags/v0.45.0
Ryan Billington 11 年之前
父節點
當前提交
547db95d62
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. +2
    -0
      users/init.sls

+ 2
- 0
users/init.sls 查看文件

@@ -25,7 +25,9 @@ include:
- group: {{ name }}
group.present:
- name: {{ name }}
{% if 'uid' in user -%}
- gid: {{ user['uid'] }}
{% endif %}
user.present:
- name: {{ name }}
- home: {{ home }}

Loading…
取消
儲存