|
|
|
|
|
|
|
|
{%- for service_name, service in pillar.items() %} |
|
|
{%- for service_name, service in pillar.items() %} |
|
|
{%- if service.get('_support', {}).get('sphinx', {}).get('enabled', False) %} |
|
|
{%- if service.get('_support', {}).get('sphinx', {}).get('enabled', False) %} |
|
|
{%- set grains_fragment_file = service_name+'/meta/sphinx.yml' %} |
|
|
{%- set grains_fragment_file = service_name+'/meta/sphinx.yml' %} |
|
|
{%- macro load_grains_file() %}{% include grains_fragment_file %}{% endmacro %} |
|
|
|
|
|
{%- set grains_yaml = load_grains_file()|load_yaml %} |
|
|
|
|
|
{%- do service_grains.sphinx.doc.update({ service_name: grains_yaml.doc }) %} |
|
|
|
|
|
|
|
|
{%- macro load_grains_file() %}{% include grains_fragment_file ignore missing %}{% endmacro %} |
|
|
|
|
|
{%- set grains = load_grains_file()|load_yaml %} |
|
|
|
|
|
{%- if grains %} |
|
|
|
|
|
{%- set grains_yaml = load_grains_file()|load_yaml %} |
|
|
|
|
|
{%- do service_grains.sphinx.doc.update({ service_name: grains_yaml.doc }) %} |
|
|
|
|
|
{%- endif %} |
|
|
{%- endif %} |
|
|
{%- endif %} |
|
|
{%- endfor %} |
|
|
{%- endfor %} |
|
|
{{ service_grains|yaml(False)|indent(4) }} |
|
|
{{ service_grains|yaml(False)|indent(4) }} |