Browse Source

Merge pull request #32 from bsundsrud/sudoer_consistency

Overwrite a sudoer file rather than append to fix #21
tags/v0.45.0
Seth House 10 years ago
parent
commit
2032369f0b
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      users/init.sls

+ 5
- 5
users/init.sls View File

{% endfor %} {% endfor %}


/etc/sudoers.d/{{ name }}: /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: - require:
- file: sudoer-defaults - file: sudoer-defaults
- file: sudoer-{{ name }} - file: sudoer-{{ name }}

Loading…
Cancel
Save