Explorar el Código

Moved support scripts around

tags/2016.12
Ales Komarek hace 9 años
padre
commit
2791e48cc7
Se han modificado 8 ficheros con 56 adiciones y 0 borrados
  1. +9
    -0
      linux/files/sphinx.grain
  2. +0
    -0
      linux/meta/collectd.yml
  3. +0
    -0
      linux/meta/heka.yml
  4. +0
    -0
      linux/meta/sensu.yml
  5. +22
    -0
      linux/meta/sphinx.yml
  6. +20
    -0
      linux/system/doc.sls
  7. +3
    -0
      linux/system/init.sls
  8. +2
    -0
      metadata/service/support.yml

+ 9
- 0
linux/files/sphinx.grain Ver fichero

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

linux/files/collectd_plugins.yml → linux/meta/collectd.yml Ver fichero


linux/files/heka_inputs.yml → linux/meta/heka.yml Ver fichero


linux/files/sensu_checks.yml → linux/meta/sensu.yml Ver fichero


+ 22
- 0
linux/meta/sphinx.yml Ver fichero

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

+ 20
- 0
linux/system/doc.sls Ver fichero

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

+ 3
- 0
linux/system/init.sls Ver fichero

@@ -36,3 +36,6 @@ include:
{%- if system.console is defined %}
- linux.system.console
{%- endif %}
{%- if system.doc is defined %}
- linux.system.doc
{%- endif %}

+ 2
- 0
metadata/service/support.yml Ver fichero

@@ -7,3 +7,5 @@ parameters:
enabled: false
sensu:
enabled: true
sphinx:
enabled: true

Cargando…
Cancelar
Guardar