Overwrite a sudoer file rather than append to fix #21
This commit is contained in:
parent
cd149fd8e6
commit
a8b6207265
@ -141,11 +141,11 @@ sudoer-{{ name }}:
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
/etc/sudoers.d/{{ name }}:
|
/etc/sudoers.d/{{ name }}:
|
||||||
file.append:
|
file.managed:
|
||||||
- text:
|
- contents: |
|
||||||
{% for rule in user['sudo_rules'] %}
|
{%- for rule in user['sudo_rules'] %}
|
||||||
- "{{ name }} {{ rule }}"
|
{{ name }} {{ rule }}
|
||||||
{% endfor %}
|
{%- endfor %}
|
||||||
- require:
|
- require:
|
||||||
- file: sudoer-defaults
|
- file: sudoer-defaults
|
||||||
- file: sudoer-{{ name }}
|
- file: sudoer-{{ name }}
|
||||||
|
Loading…
Reference in New Issue
Block a user