Page MenuHomeDevCentral

No OneTemporary

diff --git a/roles/salt-primary/init.sls b/roles/salt-primary/init.sls
index 6e4b736..291eb98 100644
--- a/roles/salt-primary/init.sls
+++ b/roles/salt-primary/init.sls
@@ -1,16 +1,17 @@
# -------------------------------------------------------------
# Salt — Provision a salt primary server
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Created: 2017-10-21
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
include:
- .software
- .config
- .account
- .cloud
- .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
index 0000000..4b95bc2
--- /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/x-diff
Expires
Sun, Oct 12, 12:15 (1 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3065915
Default Alt Text
(1 KB)

Event Timeline