diff --git a/users/init.sls b/users/init.sls index b01bc5e..1a18f14 100644 --- a/users/init.sls +++ b/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 }}