Merge pull request #10 from rfairburn/master
allow for multiple lines for the same user or group
This commit is contained in:
commit
0c7422324b
2 changed files with 16 additions and 6 deletions
|
@ -1,8 +1,12 @@
|
||||||
sudoers:
|
sudoers:
|
||||||
users:
|
users:
|
||||||
johndoe: 'ALL=(ALL) ALL'
|
johndoe:
|
||||||
|
- 'ALL=(ALL) ALL'
|
||||||
|
- 'ALL=(root) NOPASSWD: /etc/init.d/httpd'
|
||||||
groups:
|
groups:
|
||||||
sudo: 'ALL=(ALL) NOPASSWD: ALL'
|
sudo:
|
||||||
|
- 'ALL=(ALL) ALL'
|
||||||
|
- 'ALL=(nodejs) NOPASSWD: ALL'
|
||||||
defaults:
|
defaults:
|
||||||
generic:
|
generic:
|
||||||
- env_rset
|
- env_rset
|
||||||
|
@ -39,6 +43,8 @@ sudoers:
|
||||||
included_files:
|
included_files:
|
||||||
/etc/sudoers.d/extra-file:
|
/etc/sudoers.d/extra-file:
|
||||||
users:
|
users:
|
||||||
foo: 'ALL=(ALL) ALL'
|
foo:
|
||||||
|
- 'ALL=(ALL) ALL'
|
||||||
groups:
|
groups:
|
||||||
bargroup: 'ALL=(ALL) NOPASSWD: ALL'
|
bargroup:
|
||||||
|
- 'ALL=(ALL) NOPASSWD: ALL'
|
||||||
|
|
|
@ -82,14 +82,18 @@ Runas_Alias {{ name }} = {{ ",".join(runas) }}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
||||||
# User privilege specification
|
# User privilege specification
|
||||||
{%- for user,spec in users.items() %}
|
{%- for user,specs in users.items() %}
|
||||||
|
{%- for spec in specs %}
|
||||||
{{ user }} {{ spec }}
|
{{ user }} {{ spec }}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
{%- endfor %}
|
||||||
|
|
||||||
# Group privilege specification
|
# Group privilege specification
|
||||||
{%- for group,spec in groups.items() %}
|
{%- for group,specs in groups.items() %}
|
||||||
|
{%- for spec in specs %}
|
||||||
%{{ group }} {{ spec }}
|
%{{ group }} {{ spec }}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
{%- endfor %}
|
||||||
|
|
||||||
{% if includedir %}
|
{% if includedir %}
|
||||||
#includedir {{ includedir }}
|
#includedir {{ includedir }}
|
||||||
|
|
Loading…
Reference in a new issue