Overwrite a sudoer file rather than append to fix #21

This commit is contained in:
Benn Sundsrud 2014-05-13 11:36:49 -05:00
parent cd149fd8e6
commit a8b6207265

View File

@ -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 }}