|
|
@@ -58,11 +58,13 @@ pillar_roots: |
|
|
|
- {{ master.pillar.get('salt', {}).get('path', '/srv/salt/pillar') }} |
|
|
|
{%- endif %} |
|
|
|
|
|
|
|
{%- if master.pillar.engine == 'reclass' or (master.pillar.engine == 'composite' and master.pillar.reclass is defined) %} |
|
|
|
{%- if master.pillar.engine == 'reclass' or (master.pillar.engine == 'composite' and master.pillar.reclass is defined) %} |
|
|
|
|
|
|
|
reclass: &reclass |
|
|
|
storage_type: {{ master.pillar.get('reclass', {'storage_type': 'yaml_fs'}).storage_type }} |
|
|
|
inventory_base_uri: {{ master.pillar.get('reclass', {'inventory_base_uri': '/srv/salt/reclass'}).inventory_base_uri }} |
|
|
|
{# Additional options, for backward compatibility salt:master:pillar might not be defined #} |
|
|
|
{%- if master.pillar.reclass is defined %} |
|
|
|
{%- if master.pillar.reclass.reclass_source_path is defined %} |
|
|
|
reclass_source_path: {{ master.pillar.reclass.reclass_source_path }} |
|
|
|
{%- endif %} |
|
|
@@ -80,16 +82,17 @@ reclass: &reclass |
|
|
|
ignore_class_notfound: {{ master.pillar.reclass.ignore_class_notfound }} |
|
|
|
ignore_class_regexp: {{ master.pillar.reclass.ignore_class_regexp }} |
|
|
|
{%- endif %} |
|
|
|
{%- endif %} |
|
|
|
{%- endif %} |
|
|
|
|
|
|
|
{%- if master.pillar.engine == 'saltclass' or (master.pillar.engine == 'composite' and master.pillar.saltclass is defined ) %} |
|
|
|
{%- if master.pillar.engine == 'saltclass' or (master.pillar.engine == 'composite' and master.pillar.saltclass is defined ) %} |
|
|
|
|
|
|
|
saltclass: &saltclass |
|
|
|
path: {{ master.pillar.saltclass.get('path', '/srv/salt/saltclass') }} |
|
|
|
{%- endif %} |
|
|
|
|
|
|
|
|
|
|
|
{%- if master.pillar.engine in ['composite', 'reclass', 'saltclass'] %} |
|
|
|
{%- if master.pillar.engine in ['composite', 'reclass'] %} |
|
|
|
{# generate indexed list of ext_engines #} |
|
|
|
{# NONE: Might be rewritten, once proved to work properly, with filters: #} |
|
|
|
{# NONE: select('mapping')|selectattr('_index')|sort(attribute='_index') #} |
|
|
@@ -100,14 +103,18 @@ saltclass: &saltclass |
|
|
|
{%- set index = engine.get('index', '1')~'-'~name %} |
|
|
|
{%- do ext_engines.update({ index: engine }) %} |
|
|
|
{%- endfor %} |
|
|
|
{%- if ext_engines|length > 0 %} |
|
|
|
{%- if ext_engines|length > 0 or master.pillar.engine == "reclass" %} |
|
|
|
|
|
|
|
ext_pillar: |
|
|
|
{%- if master.pillar.engine == 'reclass' %} |
|
|
|
{#- too keep backward compatibility, in case master.pillar.reclass is not defied at all #} |
|
|
|
- reclass: *reclass |
|
|
|
{%- endif %} |
|
|
|
{%- for name, engine in ext_engines|dictsort %} |
|
|
|
{%- if master.pillar.engine in ['composite', 'reclass'] and engine.name == 'reclass' %} |
|
|
|
{%- if master.pillar.engine == 'composite' and engine.name == 'reclass' %} |
|
|
|
- reclass: *reclass |
|
|
|
{%- endif %} |
|
|
|
{%- if master.pillar.engine in ['composite', 'saltclass'] and engine.name == 'saltclass' %} |
|
|
|
{%- if engine.name == 'saltclass' %} |
|
|
|
- saltclass: *saltclass |
|
|
|
{%- endif %} |
|
|
|
{%- if engine.name == 'nacl' %} |
|
|
@@ -120,16 +127,16 @@ ext_pillar: |
|
|
|
{%- endif %} |
|
|
|
{%- endif %} |
|
|
|
|
|
|
|
{%- if master.pillar.engine in ['saltclass', 'reclass'] |
|
|
|
{%- if master.pillar.engine == 'reclass' |
|
|
|
or (master.pillar.engine == 'composite' and |
|
|
|
(master.pillar.saltclass is defined or |
|
|
|
master.pillar.reclass is defined )) %} |
|
|
|
|
|
|
|
master_tops: |
|
|
|
{%- if master.pillar.engine in ['composite', 'reclass'] and master.pillar.get('reclass', False) %} |
|
|
|
{%- if master.pillar.engine == 'reclass' or (master.pillar.engine == 'composite' and master.pillar.reclass is defined ) %} |
|
|
|
reclass: *reclass |
|
|
|
{%- endif %} |
|
|
|
{%- if master.pillar.engine in ['composite', 'saltclass'] and master.pillar.get('saltclass', False) %} |
|
|
|
{%- if master.pillar.engine == 'saltclass' or (master.pillar.engine == 'composite' and master.pillar.saltclass is defined ) %} |
|
|
|
saltclass: *saltclass |
|
|
|
{%- endif %} |
|
|
|
{%- endif %} |