]> Frank Brehm's Git Trees - salt/states.git/commitdiff
Adding states for SysVinit
authorFrank Brehm <frank@brehm-online.com>
Mon, 29 Feb 2016 15:54:28 +0000 (16:54 +0100)
committerFrank Brehm <frank@brehm-online.com>
Mon, 29 Feb 2016 15:54:28 +0000 (16:54 +0100)
debian/sysvinit.sls [new file with mode: 0644]
postfix/common.sls
top.sls

diff --git a/debian/sysvinit.sls b/debian/sysvinit.sls
new file mode 100644 (file)
index 0000000..1974a3f
--- /dev/null
@@ -0,0 +1,24 @@
+
+{% if  salt['grains.get']('os_family', '') == 'Debian' %}
+
+sysvinit-core:
+  pkg.installed
+
+systemd:
+  pkg.removed:
+    - require:
+      - pkg: sysvinit-core
+
+{% endif %}
+
+/etc/inittab:
+  file.replace:
+    - pattern: '^1:2345:respawn:.*'
+    - repl: '1:2345:respawn:/sbin/getty --noclear 38400 tty1'
+    - backup: minion
+    - onlyif:
+      - test -f /etc/inittab
+{% if  salt['grains.get']('os_family', '') == 'Debian' %}
+    - require:
+      - pkg: sysvinit-core
+{% endif %}
index 2d881f745af9b3407c2056933494da8adb165a05..b1c436f4c97b8843a7a66d9cf96adf073c09bc67 100644 (file)
@@ -86,6 +86,7 @@ postmap_{{ filename }}:
     - group: root
     - mode: {{ mode }}
     - template: jinja
+    - backup: minion
     - require:
       - pkg: postfix
   cmd.wait:
diff --git a/top.sls b/top.sls
index 3c1ff165b955d8ee9ad0ecb0e53579fe392c4794..3c8af591bd37045b372aac4643da7bf08307d267 100644 (file)
--- a/top.sls
+++ b/top.sls
@@ -3,16 +3,20 @@ base:
     - debian.apt
     - basic.editors
     - basic.localization
+    - debian.sysvinit
     - basic.pkgs
     - basic.rsyslog
     - basic.shells
     - basic.skel
+    - postfix.common
 
   'ns3.uhu-banane.de':
     - debian.apt
     - basic.editors
     - basic.localization
+    - debian.sysvinit
     - basic.pkgs
     - basic.rsyslog
     - basic.shells
     - basic.skel
+    - postfix.common