瀏覽代碼

Overwrite a sudoer file rather than append to fix #21

tags/v0.45.0
Benn Sundsrud 10 年之前
父節點
當前提交
a8b6207265
共有 1 個檔案被更改,包括 5 行新增5 行删除
  1. +5
    -5
      users/init.sls

+ 5
- 5
users/init.sls 查看文件

@@ -141,11 +141,11 @@ sudoer-{{ name }}:
{% endfor %}

/etc/sudoers.d/{{ name }}:
file.append:
- text:
{% for rule in user['sudo_rules'] %}
- "{{ name }} {{ rule }}"
{% endfor %}
file.managed:
- contents: |
{%- for rule in user['sudo_rules'] %}
{{ name }} {{ rule }}
{%- endfor %}
- require:
- file: sudoer-defaults
- file: sudoer-{{ name }}

Loading…
取消
儲存