0
0
mirror of https://github.com/saltstack-formulas/users-formula.git synced 2024-11-28 02:57:55 +01:00

Remove trailing slash from sudoers_dir

This commit is contained in:
Scott Reeves 2014-10-24 22:57:44 -04:00
parent a9d3f23eb5
commit ea76d0d84f
2 changed files with 13 additions and 13 deletions

View File

@ -148,7 +148,7 @@ include:
sudoer-{{ name }}: sudoer-{{ name }}:
file.managed: file.managed:
- name: {{ users.sudoers_dir }}{{ name }} - name: {{ users.sudoers_dir }}/{{ name }}
- user: root - user: root
- group: {{ users.root_group }} - group: {{ users.root_group }}
- mode: '0440' - mode: '0440'
@ -163,10 +163,10 @@ sudoer-{{ name }}:
# Specify the rule via an env var to avoid shell quoting issues. # Specify the rule via an env var to avoid shell quoting issues.
- rule: "{{ name }} {{ rule }}" - rule: "{{ name }} {{ rule }}"
- require_in: - require_in:
- file: {{ users.sudoers_dir }}{{ name }} - file: {{ users.sudoers_dir }}/{{ name }}
{% endfor %} {% endfor %}
{{ users.sudoers_dir }}{{ name }}: {{ users.sudoers_dir }}/{{ name }}:
file.managed: file.managed:
- contents: | - contents: |
{%- for rule in user['sudo_rules'] %} {%- for rule in user['sudo_rules'] %}
@ -177,9 +177,9 @@ sudoer-{{ name }}:
- file: sudoer-{{ name }} - file: sudoer-{{ name }}
{% endif %} {% endif %}
{% else %} {% else %}
{{ users.sudoers_dir }}{{ name }}: {{ users.sudoers_dir }}/{{ name }}:
file.absent: file.absent:
- name: {{ users.sudoers_dir }}{{ name }} - name: {{ users.sudoers_dir }}/{{ name }}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
@ -197,17 +197,17 @@ sudoer-{{ name }}:
{% else %} {% else %}
user.absent user.absent
{% endif -%} {% endif -%}
{{ users.sudoers_dir }}{{ name }}: {{ users.sudoers_dir }}/{{ name }}:
file.absent: file.absent:
- name: {{ users.sudoers_dir }}{{ name }} - name: {{ users.sudoers_dir }}/{{ name }}
{% endfor %} {% endfor %}
{% for user in pillar.get('absent_users', []) %} {% for user in pillar.get('absent_users', []) %}
{{ user }}: {{ user }}:
user.absent user.absent
{{ users.sudoers_dir }}{{ user }}: {{ users.sudoers_dir }}/{{ user }}:
file.absent: file.absent:
- name: {{ users.sudoers_dir }}{{ user }} - name: {{ users.sudoers_dir }}/{{ user }}
{% endfor %} {% endfor %}
{% for group in pillar.get('absent_groups', []) %} {% for group in pillar.get('absent_groups', []) %}

View File

@ -1,7 +1,7 @@
# vim: sts=2 ts=2 sw=2 et ai # vim: sts=2 ts=2 sw=2 et ai
{% set users = salt['grains.filter_by']({ {% set users = salt['grains.filter_by']({
'Debian': { 'Debian': {
'sudoers_dir': '/etc/sudoers.d/', 'sudoers_dir': '/etc/sudoers.d',
'sudoers_file': '/etc/sudoers', 'sudoers_file': '/etc/sudoers',
'root_group': 'root', 'root_group': 'root',
'shell': '/bin/bash', 'shell': '/bin/bash',
@ -10,7 +10,7 @@
'sudo_package': 'sudo', 'sudo_package': 'sudo',
}, },
'Gentoo': { 'Gentoo': {
'sudoers_dir': '/etc/sudoers.d/', 'sudoers_dir': '/etc/sudoers.d',
'sudoers_file': '/etc/sudoers', 'sudoers_file': '/etc/sudoers',
'root_group': 'root', 'root_group': 'root',
'shell': '/bin/bash', 'shell': '/bin/bash',
@ -19,7 +19,7 @@
'sudo_package': 'app-admin/sudo', 'sudo_package': 'app-admin/sudo',
}, },
'FreeBSD': { 'FreeBSD': {
'sudoers_dir': '/usr/local/etc/sudoers.d/', 'sudoers_dir': '/usr/local/etc/sudoers.d',
'sudoers_file': '/usr/local/etc/sudoers', 'sudoers_file': '/usr/local/etc/sudoers',
'root_group': 'wheel', 'root_group': 'wheel',
'shell': '/bin/csh', 'shell': '/bin/csh',
@ -28,7 +28,7 @@
'sudo_package': 'sudo', 'sudo_package': 'sudo',
}, },
'default': { 'default': {
'sudoers_dir': '/etc/sudoers.d/', 'sudoers_dir': '/etc/sudoers.d',
'sudoers_file': '/etc/sudoers', 'sudoers_file': '/etc/sudoers',
'root_group': 'root', 'root_group': 'root',
'shell': '/bin/bash', 'shell': '/bin/bash',