Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3744714
D964.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D964.diff
View Options
diff --git a/map.jinja b/map.jinja
--- a/map.jinja
+++ b/map.jinja
@@ -12,3 +12,12 @@
'lib': '/usr/local/lib',
},
}, default='Debian') %}
+
+{% set services = salt['grains.filter_by']({
+ 'Debian': {
+ 'manager': 'systemd',
+ },
+ 'FreeBSD' : {
+ 'manager': 'rc',
+ },
+}, default='Debian') %}
diff --git a/roles/shellserver/odderon/service.sls b/roles/shellserver/odderon/service.sls
--- a/roles/shellserver/odderon/service.sls
+++ b/roles/shellserver/odderon/service.sls
@@ -7,10 +7,14 @@
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
+{% from "map.jinja" import services with context %}
+
# -------------------------------------------------------------
# Unit configuration
# -------------------------------------------------------------
+{% if services['manager'] == 'systemd' %}
+
odderon_unit:
file.managed:
- name: /etc/systemd/system/odderon.service
@@ -28,3 +32,5 @@
- enable: true
- watch:
- module: odderon_unit
+
+{% endif %}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 16, 08:37 (20 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2247295
Default Alt Text
D964.diff (1 KB)
Attached To
Mode
D964: Filter code by service manager
Attached
Detach File
Event Timeline
Log In to Comment