feat(ordering): optionally append includefiles to main config
This commit is contained in:
parent
25cd2cf0e3
commit
751eff7218
29 changed files with 41 additions and 1 deletions
|
@ -51,7 +51,7 @@ Set up the sudoers file
|
|||
``sudoers.included``
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Set up an additional sudoers included file
|
||||
Set up an additional sudoers included file.
|
||||
|
||||
|
||||
Testing
|
||||
|
|
|
@ -63,3 +63,9 @@ sudoers:
|
|||
netgroups:
|
||||
other_netgroup:
|
||||
- 'ALL=(ALL) ALL'
|
||||
# ordering is important. The sudoers manpage says when multiple
|
||||
# entries match, the last match is used. However, if we do not
|
||||
# manage the main config, our included files may not match last.
|
||||
# To guarantee included files match last, set 'true' below to append
|
||||
# each '#include <includefile>' to sudoers file.
|
||||
append_included_files_to_endof_main_config: true
|
||||
|
|
|
@ -10,3 +10,4 @@ sudoers:
|
|||
execprefix: /usr/sbin
|
||||
includedir: /etc/sudoers.d
|
||||
included_files: {}
|
||||
append_included_files_to_endof_main_config: false
|
||||
|
|
5
sudoers/included/init.sls
Normal file
5
sudoers/included/init.sls
Normal file
|
@ -0,0 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=sls
|
||||
|
||||
include:
|
||||
- .install
|
|
@ -40,5 +40,9 @@ sudoers include {{ included_file }}:
|
|||
- file: {{ sudoers.configpath }}/sudoers
|
||||
- require_in:
|
||||
- file: {{ sudoers.includedir }}
|
||||
{% elif sudoers.append_included_files_to_endof_main_config %}
|
||||
file.append:
|
||||
- name: {{ sudoers.configpath }}/sudoers
|
||||
- text: '#include {{ sudoers.configpath }}/sudoers.d/{{ included_file }}'
|
||||
{% endif %}
|
||||
{% endfor %}
|
|
@ -20,6 +20,7 @@ values:
|
|||
- millert
|
||||
- dowdy
|
||||
- mikef
|
||||
append_included_files_to_endof_main_config: false
|
||||
arch: amd64
|
||||
configpath: /etc
|
||||
defaults:
|
||||
|
|
|
@ -20,6 +20,7 @@ values:
|
|||
- millert
|
||||
- dowdy
|
||||
- mikef
|
||||
append_included_files_to_endof_main_config: false
|
||||
arch: amd64
|
||||
configpath: /etc
|
||||
defaults:
|
||||
|
|
|
@ -20,6 +20,7 @@ values:
|
|||
- millert
|
||||
- dowdy
|
||||
- mikef
|
||||
append_included_files_to_endof_main_config: false
|
||||
arch: amd64
|
||||
configpath: /etc
|
||||
defaults:
|
||||
|
|
|
@ -20,6 +20,7 @@ values:
|
|||
- millert
|
||||
- dowdy
|
||||
- mikef
|
||||
append_included_files_to_endof_main_config: false
|
||||
arch: amd64
|
||||
configpath: /etc
|
||||
defaults:
|
||||
|
|
|
@ -20,6 +20,7 @@ values:
|
|||
- millert
|
||||
- dowdy
|
||||
- mikef
|
||||
append_included_files_to_endof_main_config: false
|
||||
arch: amd64
|
||||
configpath: /etc
|
||||
defaults:
|
||||
|
|
|
@ -20,6 +20,7 @@ values:
|
|||
- millert
|
||||
- dowdy
|
||||
- mikef
|
||||
append_included_files_to_endof_main_config: false
|
||||
arch: amd64
|
||||
configpath: /etc
|
||||
defaults:
|
||||
|
|
|
@ -20,6 +20,7 @@ values:
|
|||
- millert
|
||||
- dowdy
|
||||
- mikef
|
||||
append_included_files_to_endof_main_config: false
|
||||
arch: amd64
|
||||
configpath: /etc
|
||||
defaults:
|
||||
|
|
|
@ -20,6 +20,7 @@ values:
|
|||
- millert
|
||||
- dowdy
|
||||
- mikef
|
||||
append_included_files_to_endof_main_config: false
|
||||
arch: amd64
|
||||
configpath: /etc
|
||||
defaults:
|
||||
|
|
|
@ -20,6 +20,7 @@ values:
|
|||
- millert
|
||||
- dowdy
|
||||
- mikef
|
||||
append_included_files_to_endof_main_config: false
|
||||
arch: amd64
|
||||
configpath: /etc
|
||||
defaults:
|
||||
|
|
|
@ -20,6 +20,7 @@ values:
|
|||
- millert
|
||||
- dowdy
|
||||
- mikef
|
||||
append_included_files_to_endof_main_config: false
|
||||
arch: amd64
|
||||
configpath: /etc
|
||||
defaults:
|
||||
|
|
|
@ -20,6 +20,7 @@ values:
|
|||
- millert
|
||||
- dowdy
|
||||
- mikef
|
||||
append_included_files_to_endof_main_config: false
|
||||
arch: amd64
|
||||
configpath: /etc
|
||||
defaults:
|
||||
|
|
|
@ -20,6 +20,7 @@ values:
|
|||
- millert
|
||||
- dowdy
|
||||
- mikef
|
||||
append_included_files_to_endof_main_config: false
|
||||
arch: amd64
|
||||
configpath: /etc
|
||||
defaults:
|
||||
|
|
|
@ -20,6 +20,7 @@ values:
|
|||
- millert
|
||||
- dowdy
|
||||
- mikef
|
||||
append_included_files_to_endof_main_config: false
|
||||
arch: amd64
|
||||
configpath: /etc
|
||||
defaults:
|
||||
|
|
|
@ -20,6 +20,7 @@ values:
|
|||
- millert
|
||||
- dowdy
|
||||
- mikef
|
||||
append_included_files_to_endof_main_config: false
|
||||
arch: amd64
|
||||
configpath: /etc
|
||||
defaults:
|
||||
|
|
|
@ -20,6 +20,7 @@ values:
|
|||
- millert
|
||||
- dowdy
|
||||
- mikef
|
||||
append_included_files_to_endof_main_config: false
|
||||
arch: amd64
|
||||
configpath: /etc
|
||||
defaults:
|
||||
|
|
|
@ -20,6 +20,7 @@ values:
|
|||
- millert
|
||||
- dowdy
|
||||
- mikef
|
||||
append_included_files_to_endof_main_config: false
|
||||
arch: amd64
|
||||
configpath: /etc
|
||||
defaults:
|
||||
|
|
|
@ -20,6 +20,7 @@ values:
|
|||
- millert
|
||||
- dowdy
|
||||
- mikef
|
||||
append_included_files_to_endof_main_config: false
|
||||
arch: amd64
|
||||
configpath: /etc
|
||||
defaults:
|
||||
|
|
|
@ -20,6 +20,7 @@ values:
|
|||
- millert
|
||||
- dowdy
|
||||
- mikef
|
||||
append_included_files_to_endof_main_config: false
|
||||
arch: amd64
|
||||
configpath: /etc
|
||||
defaults:
|
||||
|
|
|
@ -20,6 +20,7 @@ values:
|
|||
- millert
|
||||
- dowdy
|
||||
- mikef
|
||||
append_included_files_to_endof_main_config: false
|
||||
arch: amd64
|
||||
configpath: /etc
|
||||
defaults:
|
||||
|
|
|
@ -20,6 +20,7 @@ values:
|
|||
- millert
|
||||
- dowdy
|
||||
- mikef
|
||||
append_included_files_to_endof_main_config: false
|
||||
arch: amd64
|
||||
configpath: /etc
|
||||
defaults:
|
||||
|
|
|
@ -20,6 +20,7 @@ values:
|
|||
- millert
|
||||
- dowdy
|
||||
- mikef
|
||||
append_included_files_to_endof_main_config: false
|
||||
arch: amd64
|
||||
configpath: /etc
|
||||
defaults:
|
||||
|
|
|
@ -20,6 +20,7 @@ values:
|
|||
- millert
|
||||
- dowdy
|
||||
- mikef
|
||||
append_included_files_to_endof_main_config: false
|
||||
arch: amd64
|
||||
configpath: /etc
|
||||
defaults:
|
||||
|
|
|
@ -20,6 +20,7 @@ values:
|
|||
- millert
|
||||
- dowdy
|
||||
- mikef
|
||||
append_included_files_to_endof_main_config: false
|
||||
arch: amd64
|
||||
configpath: /etc
|
||||
defaults:
|
||||
|
|
|
@ -20,6 +20,7 @@ values:
|
|||
- millert
|
||||
- dowdy
|
||||
- mikef
|
||||
append_included_files_to_endof_main_config: false
|
||||
arch: amd64
|
||||
configpath: /etc
|
||||
defaults:
|
||||
|
|
Loading…
Reference in a new issue