[wip] Initial work to enable/disable "learn" modules

This commit is contained in:
William Wernert
2021-07-26 14:24:10 -04:00
parent 2f118781ea
commit 64945cec16
7 changed files with 260 additions and 16 deletions
+19
View File
@@ -0,0 +1,19 @@
{% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls in allowed_states %}
{% set module_list = salt['pillar.get']('learn:modules', [] ) %}
{% if len(module_list) != 0 %}}
include:
{% for module in module_list %}
- .{{ module }}
{% endfor %}
{% endif %}
{% else %}
{{sls}}_state_not_allowed:
test.fail_without_changes:
- name: {{sls}}_state_not_allowed
{% endif %}