diff --git a/pillar/macros.jinja b/pillar/macros.jinja index c234db6..75fe364 100644 --- a/pillar/macros.jinja +++ b/pillar/macros.jinja @@ -1,6 +1,6 @@ {%- macro include_optional(sls_file) %} {%- for root in opts['pillar_roots'][saltenv] -%} - {%- if salt['file.file_exists']('{0}/{1}/init.sls'.format(root, sls_file)) %} + {%- if salt['file.file_exists']('{0}/{1}/init.sls'.format(root, sls_file)) or salt['file.file_exists']('{0}/{1}.sls'.format(root, sls_file)) %} - {{ sls_file }} {% endif %} {%- endfor %} diff --git a/salt/macros.jinja b/salt/macros.jinja index 64e566b..e5ad3a7 100644 --- a/salt/macros.jinja +++ b/salt/macros.jinja @@ -1,6 +1,6 @@ {%- macro include_optional(sls_file) %} {%- for root in opts['file_roots'][saltenv] -%} - {%- if salt['file.file_exists']('{0}/{1}/init.sls'.format(root, sls_file)) %} + {%- if salt['file.file_exists']('{0}/{1}/init.sls'.format(root, sls_file)) or salt['file.file_exists']('{0}/{1}.sls'.format(root, sls_file)) %} - {{ sls_file }} {% endif %} {%- endfor %}