Merge pull request #32 from bsundsrud/sudoer_consistency
Overwrite a sudoer file rather than append to fix #21
This commit is contained in:
commit
2032369f0b
@ -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…
Reference in New Issue
Block a user