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 %} |
{%- 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 }} |
{%- 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 %} |
{%- if system.console is defined %} | {%- if system.console is defined %} | ||||
- linux.system.console | - linux.system.console | ||||
{%- endif %} | {%- endif %} | ||||
{%- if system.doc is defined %} | |||||
- linux.system.doc | |||||
{%- endif %} |
enabled: false | enabled: false | ||||
sensu: | sensu: | ||||
enabled: true | enabled: true | ||||
sphinx: | |||||
enabled: true |