Przeglądaj źródła

fix grains generation

tags/2016.12
Ales Komarek 9 lat temu
rodzic
commit
f5e1777792
2 zmienionych plików z 6 dodań i 5 usunięć
  1. +3
    -2
      linux/files/sphinx.grain
  2. +3
    -3
      linux/meta/sphinx.yml

+ 3
- 2
linux/files/sphinx.grain Wyświetl plik

@@ -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) }}

+ 3
- 3
linux/meta/sphinx.yml Wyświetl plik

@@ -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'] }}

Ładowanie…
Anuluj
Zapisz