feat(ordering): optionally append includefiles to main config

This commit is contained in:
noelmcloughlin
2021-08-19 00:36:59 +01:00
parent 25cd2cf0e3
commit 751eff7218
29 changed files with 41 additions and 1 deletions
+1
View File
@@ -10,3 +10,4 @@ sudoers:
execprefix: /usr/sbin
includedir: /etc/sudoers.d
included_files: {}
append_included_files_to_endof_main_config: false
+5
View 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 %}