@@ -1,9 +1,10 @@ | |||
sphinx: | |||
{%- set grains = {'sphinx': {'doc': {}}} %} | |||
{%- for service_name, service in pillar.items() %} | |||
{%- if service.get('_support', {}).get('sphinx', {}).get('enabled', False) %} | |||
{%- 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 %} | |||
{{ service_name }}: {{ grains_yaml|yaml }} | |||
{%- set _dummy = grains.sphinx.doc.update({ service_name: grains_yaml.doc }) %} | |||
{%- endif %} | |||
{%- endfor %} | |||
{{ grains|yaml(False) }} |
@@ -9,9 +9,9 @@ doc: | |||
name: | |||
value: {{ system.name }} | |||
kernel: | |||
value: {{ grains.kernel }} {{ grains.kernelrelease }} | |||
value: {{ salt['grains.item']('kernel')['kernel'] }} {{ salt['grains.item']('kernelrelease')['kernelrelease'] }} | |||
distribution: | |||
value: {{ grains.lsb_distrib_description }} | |||
value: {{ salt['grains.item']('lsb_distrib_description')['lsb_distrib_description'] }} | |||
network: | |||
name: Network | |||
param: | |||
@@ -20,4 +20,4 @@ doc: | |||
value: {{ network.fqdn }} | |||
ip: | |||
name: IP Addresses | |||
value: {{ grains.ipv4 }} | |||
value: {{ salt['grains.item']('ipv4')['ipv4'] }} |