mirror of
https://github.com/saltstack-formulas/sudoers-formula.git
synced 2026-09-21 10:41:38 +02:00
feat(ordering): optionally append includefiles to main config
This commit is contained in:
@@ -10,3 +10,4 @@ sudoers:
|
||||
execprefix: /usr/sbin
|
||||
includedir: /etc/sudoers.d
|
||||
included_files: {}
|
||||
append_included_files_to_endof_main_config: false
|
||||
|
||||
@@ -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 %}
|
||||
Reference in New Issue
Block a user