@@ -0,0 +1,9 @@ | |||
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' %} | |||
{{ service_name }}: | |||
{%- macro indent_grains_dict() %}{% include grains_fragment_file %}{% endmacro %} | |||
{{ indent_grains_dict()|indent(4, true) }} | |||
{%- endif %} | |||
{%- endfor %} |
@@ -0,0 +1,22 @@ | |||
{%- from "linux/map.jinja" import system with context -%} | |||
{%- from "linux/map.jinja" import network with context -%} | |||
name: Linux | |||
role: | |||
system: | |||
name: System | |||
param: | |||
name: | |||
value: {{ system.name }} | |||
kernel: | |||
value: {{ grains.kernel }} {{ grains.kernelrelease }} | |||
distribution: | |||
value: {{ grains.lsb_distrib_description }} | |||
network: | |||
name: Network | |||
param: | |||
fqdn: | |||
name: FQDN | |||
value: {{ network.fqdn }} | |||
ip: | |||
name: IP Addresses | |||
value: {{ grains.ipv4 }} |
@@ -0,0 +1,20 @@ | |||
{%- from "linux/map.jinja" import system with context %} | |||
{%- if system.enabled %} | |||
linux_system_doc_grains_dir: | |||
file.directory: | |||
- name: /etc/salt/grains.d | |||
- mode: 700 | |||
- makedirs: true | |||
- user: root | |||
linux_system_doc_grain: | |||
file.managed: | |||
- name: /etc/salt/grains.d/sphinx | |||
- source: salt://linux/files/sphinx.grain | |||
- template: jinja | |||
- mode: 600 | |||
- require: | |||
- file: linux_system_doc_grains_dir | |||
{%- endif %} |
@@ -36,3 +36,6 @@ include: | |||
{%- if system.console is defined %} | |||
- linux.system.console | |||
{%- endif %} | |||
{%- if system.doc is defined %} | |||
- linux.system.doc | |||
{%- endif %} |
@@ -7,3 +7,5 @@ parameters: | |||
enabled: false | |||
sensu: | |||
enabled: true | |||
sphinx: | |||
enabled: true |