From a8b620726547673e73af2a0605b3dd084082324d Mon Sep 17 00:00:00 2001 From: Benn Sundsrud Date: Tue, 13 May 2014 11:36:49 -0500 Subject: [PATCH] Overwrite a sudoer file rather than append to fix #21 --- users/init.sls | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 }}