瀏覽代碼

Merge pull request #32 from bsundsrud/sudoer_consistency

Overwrite a sudoer file rather than append to fix #21
lookup-fix-3
Seth House 10 年之前
父節點
當前提交
2032369f0b
共有 1 個文件被更改,包括 5 次插入5 次删除
  1. +5
    -5
      users/init.sls

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

@@ -143,11 +143,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…
取消
儲存