From 67547c4c164d73ca57214a49858b3c35a1e3ce0d Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Mon, 29 Feb 2016 16:54:28 +0100 Subject: [PATCH] Adding states for SysVinit --- debian/sysvinit.sls | 24 ++++++++++++++++++++++++ postfix/common.sls | 1 + top.sls | 4 ++++ 3 files changed, 29 insertions(+) create mode 100644 debian/sysvinit.sls diff --git a/debian/sysvinit.sls b/debian/sysvinit.sls new file mode 100644 index 0000000..1974a3f --- /dev/null +++ b/debian/sysvinit.sls @@ -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 %} diff --git a/postfix/common.sls b/postfix/common.sls index 2d881f7..b1c436f 100644 --- a/postfix/common.sls +++ b/postfix/common.sls @@ -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 3c1ff16..3c8af59 100644 --- 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 -- 2.39.5