Page MenuHomeDevCentral

D3279.id8438.diff
No OneTemporary

D3279.id8438.diff

diff --git a/roles/salt-primary/init.sls b/roles/salt-primary/init.sls
--- a/roles/salt-primary/init.sls
+++ b/roles/salt-primary/init.sls
@@ -14,3 +14,4 @@
- .staging
- .salt-wrapper
- .api
+ - .reactor
diff --git a/roles/salt-primary/reactor/init.sls b/roles/salt-primary/reactor/init.sls
new file mode 100644
--- /dev/null
+++ b/roles/salt-primary/reactor/init.sls
@@ -0,0 +1,31 @@
+# -------------------------------------------------------------
+# Salt — Provision a salt primary server
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% from "map.jinja" import dirs with context %}
+
+# -------------------------------------------------------------
+# Salt configuration
+#
+# When reactor is available, symlink it.
+#
+# As Salt primary server will fail if a configuration file
+# is not readable, it is necessary to remove the symlink when
+# the reactor config does not exist.
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{% if salt["slsutil.file_exists"]("reactor/reactor.conf") %}
+
+{{ dirs.etc }}/salt/master.d/reactor.conf:
+ file.symlink:
+ - target: /opt/salt/nasqueron-operations/reactor/reactor.conf
+
+{% else %}
+
+{{ dirs.etc }}/salt/master.d/reactor.conf:
+ file.absent
+
+{% endif %}

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 23, 17:57 (18 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2256975
Default Alt Text
D3279.id8438.diff (1 KB)

Event Timeline