Moved support scripts around
diff --git a/linux/files/sphinx.grain b/linux/files/sphinx.grain
new file mode 100644
index 0000000..e1bf48c
--- /dev/null
+++ b/linux/files/sphinx.grain
@@ -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 %}
\ No newline at end of file
diff --git a/linux/files/collectd_plugins.yml b/linux/meta/collectd.yml
similarity index 100%
rename from linux/files/collectd_plugins.yml
rename to linux/meta/collectd.yml
diff --git a/linux/files/heka_inputs.yml b/linux/meta/heka.yml
similarity index 100%
rename from linux/files/heka_inputs.yml
rename to linux/meta/heka.yml
diff --git a/linux/files/sensu_checks.yml b/linux/meta/sensu.yml
similarity index 100%
rename from linux/files/sensu_checks.yml
rename to linux/meta/sensu.yml
diff --git a/linux/meta/sphinx.yml b/linux/meta/sphinx.yml
new file mode 100644
index 0000000..e074199
--- /dev/null
+++ b/linux/meta/sphinx.yml
@@ -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 }}
diff --git a/linux/system/doc.sls b/linux/system/doc.sls
new file mode 100644
index 0000000..fbb63e6
--- /dev/null
+++ b/linux/system/doc.sls
@@ -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 %}
\ No newline at end of file
diff --git a/linux/system/init.sls b/linux/system/init.sls
index f46bf09..b81da9f 100644
--- a/linux/system/init.sls
+++ b/linux/system/init.sls
@@ -36,3 +36,6 @@
{%- if system.console is defined %}
- linux.system.console
{%- endif %}
+{%- if system.doc is defined %}
+- linux.system.doc
+{%- endif %}
diff --git a/metadata/service/support.yml b/metadata/service/support.yml
index 0629f75..55cb43b 100644
--- a/metadata/service/support.yml
+++ b/metadata/service/support.yml
@@ -7,3 +7,5 @@
enabled: false
sensu:
enabled: true
+ sphinx:
+ enabled: true